Hi,
I have a session bean
MRManagerBean
and a few other beans.. in a mrejbs.jar when deploying I get
.jca:name=EtsDataSource,service=DataSourceBinding to JNDI name
'java:EtsDataSource'
[EjbModule] Deploying MarketingRequestItemShipments
[EjbModule] Deploying MarketingRequests
[EjbModule] Deploying MarketingRequestItems
[EjbModule] Deploying MRManager
[EJBDeployer] Deployed: file:/C:/jboss/server/default/deploy/mrejbs.jar
In ther JBoss console.
But when I try to use it in client class
InitialContext ic = new InitialContext();
Object ref = ic.lookup("java:comp/MRManagerLocal");
MRManagerLocalHome home = (MRManagerLocalHome)
PortableRemoteObject.narrow(ref,MRManagerLocalHome.class);
MRManagerLocal localSession = home.create();
I get
12:57:57,124 INFO [STDOUT] javax.naming.NameNotFoundException: ejb not bound
12:57:57,124 INFO [STDOUT] at
org.jnp.server.NamingServer.getBinding(NamingServer.java:491)
12:57:57,139 INFO [STDOUT] at
org.jnp.server.NamingServer.getBinding(NamingServer.java:499)
12:57:57,139 INFO [STDOUT] at
org.jnp.server.NamingServer.getObject(NamingServer.java:505)
12:57:57,139 INFO [STDOUT] at
org.jnp.server.NamingServer.lookup(NamingServer.java:249)
12:57:57,139 INFO [STDOUT] at
org.jnp.interfaces.NamingContext.lookup(NamingContext.java:610)
12:57:57,139 INFO [STDOUT] at
org.jnp.interfaces.NamingContext.lookup(NamingContext.java:572)
12:57:57,139 INFO [STDOUT] at
javax.naming.InitialContext.lookup(InitialContext.java:347)
I have tried
Object ref = ic.lookup("MRManagerLocal");
Object ref = ic.lookup("ejb/MRManagerLocal");
Object ref = ic.lookup("java:comp/env/ejb/MRManagerLocal");
all with the same error.
My descriptors look like
JBoss.xml
<ejb-name>MRManager</ejb-name>
<local-jndi-name>MRManagerLocal</local-jndi-name>
<method-attributes>
</method-attributes>
ejb-jar.xml
[CDATA[]]
<ejb-name>MRManager</ejb-name>
<local-home>mr.massconnections.server.MRManagerLocalHome</local-home>
mr.massconnections.server.MRManagerLocal
<ejb-class>mr.massconnections.server.MRManagerSession</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
I am not sure what I am missing or where I am going wrong.. I looked at the
Jndi list on the console and it says that the JNDI name is "MRManagerLocal"
Can anyone help me.
Regards
Rajesh J
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3885768#3885768
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3885768
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user