Ok
--We have to use most Orion tools in developing our application
--we are going to use the OrionCmpPrimer cmp ex
In orion/applications directory :
create a dir named addressbook
-run earassembler.jar  by typing java -jar earassembler.jar
-from File create new application
-from Application add create EJB jar and name it addressbook-ejb
-from Application add create Web-Application and name it addressbook-web
every time click on yes to create an Orion specific app
-from file click on SAVE in our created directory addressbook
Now  in addressbook  ckeck the following:
addressbook/META-INF/application.xml
addressbook/addressbook-ejb/META-INF/ejb.jar.xml
addressbook/addressbook-web/WEB-INF/web.xml
NOW we have created our application & its necessary application.xml ejb.jar.xml& web.xml
 
to install this application
-in server.xml add:
<application name="addressbook" path="../applications/addressbook"/>
-in Default-web-site add:
<wep-app application ="addressbook" name="addressbook-web" root="/addressbook"/>
First to test our appliaction u can put an index.html
in addressbook-web directory
when u run Orion :
type http:localhost:xxxx/addressbook
make sure to add index.html to web.xml as a welcome-file:
Now we are going to create an addressbook cmp bean:
run ejbmaker.jar java -jar ejbmaker.jar
create a bean  and name it addressbook.ejb.addressbook
save it in addressbook-ejb dir
make your bean classes the same as of OrionCmpPrimer
Now u have your bean ,its remote interface % home interface under the dir Say C:\orion\applications\addressbook\addressbook-ejb\addressbook\ejb\addressbook.java
....................\addressbookHome.java
.....................addressbookEJB.java 
now we have to compile our classes to update our ejb-jar.xml and web.xml
by this very simple build.xml
<?xml version="1.0"?>
 
<project name="addressbook" basedir="." default="all">
<target name="init">
<property name="src.dir" value="addressbook-ejb"/>
 </target>
<target   name="comp" depends="init">
<javac srcdir ="${src.dir}"/>
</target>
   <target name="all" depends ="comp">
 
  
  </target>
</project>
 
for the sake of making it easy for u use the same OrionCmpPrimer jsp list,add,edit & delete.jsp's
exmaple and use the 4 jsp.files
put the 4 jsp under the dir addressbook-web and call 
list.jsp throught index.html
Now we have on thing left
run ejbassembler  go addressbook-ejb
just hightlight addressbook-ejb and click on open
add our new bean ref
from Beans right click then add EJB
then click on entity bean
make sure to add all the cmp-fields 3 of them
-run webassembler java -jar webassembler.jar
do the same thing go addressbook-web highlight it
and click on open
add the welcome-file(index.html) right click on Welcome-files
add EJB References rightclick on EJBReferences
make sure to include the addessbook.ejb.addressbook
.....................................addressbok.ejb.addressbookHome
make the ejb-ref    ejb/addressbookHome
for our 4 jsp
check your web.xml ejb.jar.xml and application.xml
run orion try your application
good luck
 
 
 
 
 
 
 
 
 
 
----- Original Message -----
Sent: Sunday, February 11, 2001 8:56 PM
Subject: Re: RE to Phan Anh Tran

Please send me the details.  Thanks.
 
Anh
 
----- Original Message -----
From: faisal
Sent: Saturday, February 10, 2001 6:36 PM
Subject: RE to Phan Anh Tran

Doing without  ear file can be very easy and it allows easy update in Orion
create a new directory under orion\applications
run earassembler.jar
From file click on new application
From application click on new  create new EJB jar
From application click on new create new WEB application
save it in the created directory
this will create the  your web application including all the necessary ejb.jar web.xml & application.xml
if u need to create cmp bean u can use EJBmaker.jar
and all u need now  is a simple build.xml to only compile your bean
classes and servlet
in case u need more details I ca send u a detailed full application
good luck
 

Reply via email to