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

Martin N do-not-reply at jboss.com
Mon Jan 25 19:15:52 EST 2010


User development,

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

http://community.jboss.org/message/522176#522176

Author  : Martin N
Profile : http://community.jboss.org/people/MartinN

Message:
--------------------------------------------------------------
I need to be able to look up a POJO deployed service on JBoss 5's MC, but I do not know how to obtain a reference to the kernel so I can obtain a ControllerContext.
 
My onIy constraint is I can not modify the interface of the service where I need to lookup the POJO service (or else I could just inject it straight up via the -bean.xml descriptor).  The look up would work exactly as JNDI would - but why do JNDI if I can somehow directly access the JBoss MC kernel?
 
Can someone point me to an example on how to do this, or is this even possible?
 
I did find Ales Justin's mc-int utility that looks up the kernel inside a servlet given a "ServletContext" as input. I need something exactly like this.
 
Am I missing something really obvious here because it looks to me like there should be some easy way of doing this .
 
Sorry - I've been doing JMX and jboss 4.2.3 for a long time and am sorta new to this paradigm..
 
Thanks!

--------------------------------------------------------------

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




More information about the jboss-user mailing list