I'm trying to write a very simple local session bean.  I'm actually doing the 
exact same app as in the JBossIDE tutorial, with a session bean that computes 
Fibonacci numbers, and a servlet client.  The difference is that my session 
bean is local, whereas the tutorial one is a remote EJB.

I can get my client to work...just not how I want.  I specify a local-jndi-name 
in the deployment descriptors, but regardless, JBoss still gives it the same 
name.  Here are the relevant portions of the deployment descriptors:

jboss.xml

  | <session>
  |          <ejb-name>Fibo</ejb-name>
  |          <local-jndi-name>ejb/fibo/Fibo</local-jndi-name>
  | 
  |         <method-attributes>
  |         </method-attributes>
  | </session>
  | 

web.xml

  | <ejb-local-ref>
  |       <description><![CDATA[Reference to the Fibo EJB]]></description>
  |       <ejb-ref-name>ejb/Fibo</ejb-ref-name>
  |       <ejb-ref-type>Session</ejb-ref-type>
  |       <local-home>tutorial.interfaces.FiboLocalHome</local-home>
  |       <local>tutorial.interfaces.FiboLocal</local>
  | </ejb-local-ref>
  | 

jboss-web.xml

  | <ejb-local-ref>
  |       <ejb-ref-name>ejb/Fibo</ejb-ref-name>
  |       <local-jndi-name>ejb/fibo/Fibo</local-jndi-name>
  | </ejb-local-ref>
  | 



So from my servlet, I ought to be able to get a LocalHome reference with
home = (FiboLocalHome) context.lookup("java:/comp/env/ejb/fibo/Fibo");

However, the only way I'm able to get it is with context.lookup("local/Fibo"); 
which is not what I want at all.  I want to be able to specify the 
local-jndi-name, not be stuck with whatever JBoss defaults to, which apparently 
is "local/EJBNAME."

I know it's possible, because I did this a few months ago when I was messing 
around with JBoss.  Haven't done anything since...so I'm not sure why I'm 
having this problem.

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

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


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to