Hi,
is it possible to make a lookup on a SessionContext on a session bean?
I have the following stateless session bean:
| Interface:
| public interface IAttributeService
|
| Implementation:
| @Stateless
| @Local( { IAttributeService.class })
| @LocalBinding( jndiBinding = "IAttributeService-local" )
| public class AttributeServiceImpl implements IAttributeService
|
Via the JNDIView On the JMX-console i get the following mapping:
IAttributeService-local
$Proxy147
I tried to make a lookup from another session bean:
| @Resource
| private SessionContext fContext;
| ...
| IAttributeService attService = (IAttributeService) fContext.lookup(
"IAttributeService-local" );
|
But always null is returned.
On jboss-4.0.3RC2 (EJB_3.0_RC1) it worked fine but now on jboss-4.0.4RC1
(EJB_3.0_RC5) it doesnt work anymore.
So must i use the InitialContext?
| InitialContext ctx = new InitialContext();
| IAttributeService attService = (IAttributeService)
ctx.lookup("IAttributeService-local");
|
If I use the initial context I get the AttributeService.
Why its not possible to make a lookup via the SessionContext?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3925541#3925541
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3925541
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user