[jboss-user] [JBoss Microcontainer] New message: "Re: Lookup up a POJO service without injecting it inside -beans.xml?"

Ales Justin do-not-reply at jboss.com
Wed Jan 27 10:18:13 EST 2010

User development,

A new message was posted in the thread "Lookup up a POJO service without injecting it inside -beans.xml?":


Author  : Ales Justin
Profile : http://community.jboss.org/people/alesj

Zdravo :-)
> The "getInstalledContext("SvcB")" from ServiceA.java fails. It suggest some sort of scoping is at play because if I look up SvcA from ServiceA, it works just fine.  I want to be able to look up a service just the same as if it is injected to me via "<inject bean=" from any service. Is this possible? Thanks!
No scoping. ;-)
I think I know what the problem is.
You're doing the lookup to soon.
At the moment you try to find *installed* SvcB, that one is *not* installed yet.
You can either
* try to do lookup via getContext("SvcB", null)
* make sure when SvcA invoked init, SvcB is already *fully* installed; SvcA depends on SvcB at Installed state
If this is not it, post the stack trace you're catching in init.


To reply to this message visit the message page: http://community.jboss.org/message/522543#522543

More information about the jboss-user mailing list