...
<session>
<display-name>L2CustomerBroker</display-name>
<ejb-name>L2CustomerBroker</ejb-name>
<home>com.brighthaul.ste.server.brokers.L2CustomerBrokerHome</home>
<remote>com.brighthaul.ste.server.brokers.L2CustomerBroker</remote>
<ejb-class>com.brighthaul.ste.server.brokers.L2CustomerBrokerBean</ejb-class
>
<session-type>Stateful</session-type>
<transaction-type>Container</transaction-type>
<ejb-ref>
<ejb-ref-name>com.brighthaul.ste.server.brokers.L2CustomerBrokerHome</ejb-re
f-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>com.brighthaul.ste.server.brokers.L2CustomerBrokerHome</home>
<remote>com.brighthaul.ste.server.brokers.L2CustomerBroker</remote>
<ejb-link>L2CustomerBroker</ejb-link>
</ejb-ref>
</session>
...
Its matching entry in "weblogic-ejb-jar.xml" is:
...
<weblogic-enterprise-bean>
<ejb-name>L2CustomerBroker</ejb-name>
<stateful-session-descriptor>
<stateful-session-clustering/>
<allow-concurrent-calls>true</allow-concurrent-calls> <!-- Is this
right?!! -->
</stateful-session-descriptor>
<transaction-descriptor/>
<reference-descriptor>
<ejb-reference-description>
<ejb-ref-name>com.brighthaul.ste.server.brokers.L2CustomerBrokerHome</ejb-re
f-name>
<jndi-name>L2CustomerBroker</jndi-name>
</ejb-reference-description>
</reference-descriptor>
<jndi-name>L2CustomerBroker</jndi-name>
</weblogic-enterprise-bean>
...
When a simple test application tries to locate the *L2CustomerBroker* bean
via:
...
context.lookup("com.brighthaul.ste.server.brokers.L2CustomerBroker");
...
a NamingException is thrown:
javax.naming.NameNotFoundException: Unable to resolve
'com.brighthaul.ste.server.brokers.L2CustomerBrokerHome' Resolved: ''
Unresolved:'com' ; remaining name
'com.brighthaul.ste.server.brokers.L2CustomerBroker'
at
weblogic.rmi.internal.BasicOutboundRequest.sendReceive(BasicOutboundRequest.
java:109)
at
weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java
:263)
at
weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java
:230)
at weblogic.jndi.internal.ServerNamingNode_WLStub.lookup(Unknown
Source)
at
weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:337)
at
weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:332)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at
com.brighthaul.ste.common.util.EJBHomeFactory.lookUpHome(EJBHomeFactory.java
:77)
at
com.brighthaul.ste.server.brokers.DeleteMe.main(DeleteMe.java:15)
Exception in thread "main"
What am I doing wrong?
I'm able to locate the home interface via the "usual" way (looking up
"L2CustomerBroker").
Replace
com.brighthaul.ste.server.brokers.L2CustomerBroker
in ejb-ref-name with
ejb/com.brighthaul.ste.server.brokers.L2CustomerBroker
and use
context.lookup("java:comp/ejb/com.brighthaul.ste.server.brokers.L2CustomerBr
oker");
in your code to look up the bean
Hopr this helps.
Regards,
S;ava Imeshev
"Yonatan Taub" <jona...@brighthaul.com> wrote in message
news:3ede...@newsgroups.bea.com...
I think you mean
context.lookup("java:comp/env/ejb/com.brighthaul.ste.server.brokers.L2Custom
erBroker");
java:comp/env is the prefix for references
--
Michael Kovacs
Senior Software Engineer
BEA Systems
"Slava Imeshev" <ime...@yahoo.com> wrote in message
news:3ede2d2a$1...@newsgroups.bea.com...
If you can provide me with some sample code I would greatly appreciate it.
"Michael Kovacs" <nom...@foo.com> wrote in message
Thanks for correction, I did mean java:comp/env/ejb.
Regards,
Slava Imeshev
"Michael Kovacs" <nom...@foo.com> wrote in message