Win a copy of Get Programming with Java (MEAP only) this week in the Beginning Java forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

How to deploy EJBs in JBOSS?  RSS feed

 
Ranch Hand
Posts: 431
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All

I have created the bean class, home and component interfaces and the ejb-jar.xml file. Now how can I deploy them in JBOSS. Also do I need to do all the things manually right from creating the client jar file with the interfaces to the JNDI entry?. Can anyone explain clearly how to do EJB deployment in JBOSS4.0 so that I can access the method present in the bean class from my client java program?. Advance thanks.
 
Ranch Hand
Posts: 293
Java Mac OS X Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On JBoss, you need to make a JAR file that contains your beans. To deploy the JAR file, simple copy it into the server/default/deploy directory (assuming you are using the deault instance). If you watch the console whilst doing this, you can see a message saying that your bean has ben deployed, or telling you of any errors that have occured.

To invoke the bean, you do not need any special JARS. Just look up the home interface via JNDI and create an instance of your bean from that.

Dave.
 
S.L.Narayanan
Ranch Hand
Posts: 431
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That is fine. But where can I set the JNDI name for the bean?
 
Author
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
jboss.xml - This optional file is used to specify a different JNDI name for a bean's home interface. The default JNDI name for a bean is the ejb-jar.xml ejb-name element value.
 
Shiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!