Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • 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 ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
  • Piet Souris
  • Himai Minh

Regarding Deploying Ejb in Weblogic server 5.1

Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have just started doing ejbs.. i wrote first example using statelessSessionBean .. aim is to print "hello world"..for this i have written remote interface,home interface, session bean and client .. but the problem is that i dont know how to write "ejb-jar.xml" file and also "weblogic-ejb-jar.xml" file so please help me out with step by step guide to deploying ejb in weblogic server 5.1 and how to create "ejb-jar.xml file" and "weblogic-ejb-jar.xml" file manaually along with the entire solution for deploying.
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Vibhor,
Please refer to examples directory of weblogic 5.1.Copy one ejb-jar.xml,weblogic-jar.xml files to your directory.Change the same as per your requirement.
Following is the ejb-jar.xml for a stateless session bean
<?xml version="1.0"?>
< !DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN' ''>
<env-entry-type>java.lang.Double </env-entry-type>
<env-entry-type>java.lang.Double </env-entry-type>
<env-entry-type>java.lang.Integer </env-entry-type>
Here's the weblogic-jar.xml

<?xml version="1.0"?>
< !DOCTYPE weblogic-ejb-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic 5.1.0 EJB//EN' ''>

and here's the build file you have run after creating above files
It's .cmd file
@REM Copyright (c) 2000 BEA Systems, Inc. All Rights Reserved.
@REM Adjust these variables to match your environment
if "" == "%JAVA_HOME%" set JAVA_HOME=\java
if "" == "%WL_HOME%" set WL_HOME=\weblogic
set MYSERVER=%WL_HOME%\myserver
set MYCLASSPATH=%JAVA_HOME%\lib\;%WL_HOME%\classes;%WL_HOME%\lib\weblogicaux.jar;%MYSERVER%\clientclasses
@REM Create the build directory, and copy the deployment descriptors into it
mkdir build build\META-INF build\images
copy *.xml build\META-INF
copy *.gif build\images
@REM Compile ejb classes into the build directory (jar preparation)
javac -d build -classpath %MYCLASSPATH%
@REM Make a standard ejb jar file, including XML deployment descriptors
cd build
jar cv0f std_ejb_basic_statelessSession.jar META-INF examples images
cd ..
@REM Run ejbc to create the deployable jar file
java -classpath %MYCLASSPATH% -Dweblogic.home=%WL_HOME% weblogic.ejbc -compiler javac build\std_ejb_basic_statelessSession.jar %MYSERVER%\ejb_basic_statelessSession.jar
@REM Compile ejb interfaces & client app into the clientclasses directory
javac -d %MYSERVER%\clientclasses -classpath %MYCLASSPATH%
This is for the Trader Example.Please check your jdk path in the build.cmd file.
I hope this will give you lot of inputs for further exploring the EJB.Wish you Happy Exploring EJB.
I've been selected to go to the moon! All thanks to this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
    Bookmark Topic Watch Topic
  • New Topic