Szymon Pietrzak

Greenhorn
+ Follow
since Apr 27, 2011
Merit badge: grant badges
For More
Poznań
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Szymon Pietrzak

no, I did not since I do not use Arquillian, but if I get desperate I shall try this solution:)
I did not, unfortunately no one replied to my inquiries. I’ll let you know as soon as I find out how to get it working.
Hi!

I wonder if anyone can help me with locating logs that embedded glassfish produces during deploy in unit tests. I've tried to locate them with no success. Is there any way to force embedded glassfish to produce logs in specified location? I'm trying to write some tests using JUnit and Embedded Glassfish and it crashes during startup and says 'look into the logs' but no log files are present. Any help will be appreciated, this issue is getting critical for me;)
I can see multitude of examples, but still have some questions:

1. Can an EJB be registered as OSGi service without use of BundleActivator and direct call to OSGi APIs (for instance via annotation)? From your reply I understand that each EJB is automatically registered as OSGi service on GlassFish - am I correct?

2. Can an OSGi service which is EJB be referred to from another module only via use of annotations (@Injected @OSGiService) or do I have to create BundleActivator and use ServiceTracked to find the service in the context?
It is true, but what I was thinking about was something similar to Spring OSGi context declaration, which allows you to declare beans, OSGi services and import them from the context of one module bundle to another.

Here the import seems easy using JEE dependency injection and annotations, but you still have to declare bundle activator and register your services in code, not in config file. I was wandering whether or not such way of bundle services declaration (one XML config file) is supported by JEE and whether or not it is possible to avoid declaring them in code.

BTW. great video tutorial, clarifies a lot!
I am somewhat new to using pure JEE without Spring framework or dm/Virgo server. I've worked with OSGi using Spring framework and their XML based OSGi services/references declarations.

Is there any way to configure OSGi services in the same manner using pure JEE 6 on Glassfish?

I've found some examples of modular projects using beans from each other's context, but it was done directly in the code via references to container classes and resources, which I consider rather crude and unaesthetic solution.

I'd be grateful for any help and examples of such configuration.