Vica-versa? Let a @Singleton fire off an OSGi service. You can inject
the EJB into the singleton and pass it onwards.
Carlo
On 07/18/2011 10:04 AM, David Bosschaert wrote:
Hi,
I have a piece of code that needs to kick into action when a particular
EJB is registered. What would be the best way to do this? The code is in
user-space, it's an OSGi bundle that needs to do something once the EJB
is available...
So I thought about the following:
* register a DeploymentUnitProcessor, however this is a bit heavyweight
to ask a EJB/OSGi developer to do...
* maybe register an MSC service that waits for an MSC service registered
by the EJB to appear? this is also a bit heavyweight and I don't think
the MSC services registered by the EJB are documented/part of the public
API...
* It would be nice if I could simply listen for the JNDI registration...
is that possible?
As a workaround, I also thought about this:
* If I deploy my artifacts in a certain order, will the appserver deploy
them again in the same order on a restart?
Thanks,
David
_______________________________________________
jboss-as7-dev mailing list
jboss-as7-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev