Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Where to save my servlet class in jboss which calls ejb

 
Sanmar Marshel
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
java Experts


I need a help form you, can u plz tell me where to place my servlet class in jboss which calls ejb.
Actually, I am new to Jboss and ejb.

Thank you,

From
Sandeep Marshall
 
Me
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sandeep Marshall,
java application is packed as .ear file.

1a. Put your servlet in this structure.

..servlet-archive
..|
..|-WEB-INF
..|....|-web.xml,jboss-web.xml
..|
..|-classes
..|....|-*.class

1b. pack as .war file using jar utility.



2a. Put your ejb in following struture

ejb-archive
..|
..|-META-INF
..|....|ejb-jar.xml,jboss.xml
..|
..|*.class

2a. pack your ejb as .jar file


3. Place your .war and .jar in following order

appl.ear
..|
..|-META-INF
..|....|
..|....|-application.xml
..|
..|-your .war
..|
..|-your .jar
..|



Pack these files as .ear file again using jar utility.

Once packed, you just drop this .ear file in
C:\jboss-3.2.5\server\default\deploy (assuming you are running JBoss in default mode) JBoss will then unpack and deploy it.

You will find this link useful
http://java.sun.com/j2ee/1.4/docs/tutorial/doc/Overview5.html

You can use .bat file or any scripting language of your choice. Java developers prefer to use ANT for this purpose.

Hope it helps.
[ July 21, 2004: Message edited by: Muzammil Koker ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic