Hi,

I am facing a curious problem ! When I try to access an entity bean from a session 
facade locally using the component name of the bean, I get a ejb not bound error. This 
does not happen if I specify the JNDI name !

>From jboss.xml :


  |       <entity>
  |          <ejb-name>Journal</ejb-name>
  |          <jndi-name>ejb/JournalHome</jndi-name>
  |          <local-jndi-name>ejb/JournalLocalHome</local-jndi-name>
  | 
  |         <method-attributes>
  |         </method-attributes>
  | 
  |       </entity>
  | 

Now when I try to use the component name :


  | InitialContext ic = new InitialContext();
  | 
  | JournalLocalHome home = (JournalLocalHome) 
ic.lookup("java:comp/env/ejb/JournalLocalHome");
  | 

I get the below error :


  | javax.naming.NameNotFoundException: ejb not bound
  |     at org.jnp.server.NamingServer.getBinding(NamingServer.java:495)
  |     at org.jnp.server.NamingServer.getBinding(NamingServer.java:503)
  |     at org.jnp.server.NamingServer.getObject(NamingServer.java:509)
  |     at org.jnp.server.NamingServer.lookup(NamingServer.java:253)
  |     at org.jnp.server.NamingServer.lookup(NamingServer.java:256)
  | 

But when I do the lookup with the JNDI name :


  | InitialContext ic = new InitialContext();
  | 
  | JournalLocalHome home = (JournalLocalHome) ic.lookup("ejb/JournalLocalHome");

it works just fine !

Any configuration I need to do to make the bean accessible by component name ?

Thanks.

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3848301#3848301

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3848301


-------------------------------------------------------
This SF.Net email is sponsored by: thawte's Crypto Challenge Vl
Crack the code and win a Sony DCRHC40 MiniDV Digital Handycam
Camcorder. More prizes in the weekly Lunch Hour Challenge.
Sign up NOW http://ad.doubleclick.net/clk;10740251;10262165;m
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to