• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JNDI binding weird behaviour

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have a seam generated application with Statles sessions beans.
The app name is myapp and inside it there is a myapp.jar file wich contains the stateless sessions.

After jboss 4.2.3 is started I can see my statless session beans mapped to myapp/EJBNAME/local
EJBNAME = name of the Statles EJB class

I am able to lookup any statless session bean using the jndi mapping above as long as myapp.jarfile name is unchanged.

If I change myapp.jar file name to test.jar and also change the in application.xml this :
<module>
<ejb>myapp.jar</ejb>
</module>
to:
<module>
<ejb>test.jar</ejb>
</module>

I am unable to lookupany of my statless session beans.

I do not know why is this and if there is a work around.

Could anyone help on this?

Thank you


I
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Joe,

By default, JBoss uses the application name to bind the beans to JNDI. However, you can override this behaviour by using the LocalBinding and RemoteBinding annotations. See this for JBossAS-4.x example http://www.jboss.org/jbossejb3/docs/tutorial/jndibinding/jndi.html
 
Ioan Berciu
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you for your answer I manage to make it work.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic