Hello Stefan,

First of all, the files organization:
one J2EE application (e.g. <my-app>) is packed into a jar file whose name is
modified to ear, that application may contain (zero or more) of the
following components: EJB packed into jar files (e.g. <my-ejb>), and web
applications (e.g. <my-web-app>) packed into a jar file whose name is
modified to war.

<my-app>.ear/
<my-app>.ear/<my-ejb1>.jar
<my-app>.ear/<my-ejb2>.jar
<my-app>.ear/<my-web-app1>.jar
<my-app>.ear/<my-web-app2>.jar
<my-app>.ear/<my-web-app3>.jar

Remember that an EJB may be accessed by other EJBs within the same
application (<my-app>), from web applications within the same application
(<my-web-appi>) or from outside (in that case you have to do more work).

In order to be served the application, the EJBs and the web applications
have to be declared. You specify them in the <orion-path>/config/server.xml
file:
1. using the <application> tag your application is declared (the EBJs are
then implicitely retrieved from within the <my-app>.ear file.
2. using the <web-site> tag you declare your web sites.
Note: use absolute paths (with backslashed in windows).


Now lets look a the <my-app>.ear organization.

<my-app>.ear/META-INF/application.xml
<my-app>.ear/META-INF/orion-application.xml
<my-app>.ear/META-INF/data-sources.xml
<my-app>.ear/META-INF/<my-web-site>.xml
<my-app>.ear/META-INF/principals.xml

<my-app>.ear/lib/

<my-app>.ear/<my-ebj>.jar/META-INF/ejb-jar.xml
<my-app>.ear/<my-ebj>.jar/META-INF/orion-ejb-jar.xml

<my-app>.ear/<my-web-app>.war/WEB-INF/web.xml
<my-app>.ear/<my-web-app>.war/WEB-INF/orion-web.xml
<my-app>.ear/<my-web-app>.war/lib
<my-app>.ear/<my-web-app>.war/classes
<my-app>.ear/<my-web-app>.war/


A little description:
<my-app>.ear/META-INF/application.xml
        Use the <module> tag to declare the components of your application:
        <my-ejb>.jar and <my-app>.war;
        that tag gives them a name that is referenced from
<orion-path>/config/server.xml.

<my-app>.ear/META-INF/orion-application.xml
        Declares deployment-specificities, such as (absolute) path to:
        jars located in the <my-app>.ear/META-INF/lib directory. 
        Declare their path as "lib/....jar"
        Declares the location of data-sources.xml and principals.xml;
        use following path
"<path-to-deployment>\<my-app>\META-INF\principals.xml"
        (the same holds for data-sources.xml).

<my-app>.ear/META-INF/data-sources.xml
        This file holds the information about how to connect to your DB.
        Although you could use the default one, I recommend you to put it
here,
        it is too easy to forget files when deploying your app into another
        Orion.
        Note: do not forget to declare the path to this file in
orion-application.xml (see before)

<my-app>.ear/META-INF/principals.xml
        This file declares security roles and groups (use same name for
both).
        Although you could use the default one, I recommend you to put it
here,
        it is too easy to forget files when deploying your app into another
        Orion.  
        Note: do not forget to declare the path to this file in
orion-application.xml (see before)

<my-app>.ear/META-INF/<my-web-site>.xml
        This file declares your web application.
        This file could be located somewhere else, however the same as
before
        holds.
        Note: do not forget to declare the path to this file in 
        <orion-path>/config/server.xml

<my-app>.ear/lib/
        This directory holds the jars your application depends on.

<my-app>.ear/<my-ebj>.jar/META-INF/ejb-jar.xml
        The descriptor of your EJBs.
<my-app>.ear/<my-ebj>.jar/META-INF/orion-ejb-jar.xml
        Deployment specificities of your EJBs 
        (e.g. the queries associated to finder methods).


<my-app>.ear/<my-web-app>.war/WEB-INF/web.xml
        Declares your servlets, and web applications configuration.
<my-app>.ear/<my-web-app>.war/WEB-INF/orion-ejb-jar.xml
        Deployment specificities of your web app.
<my-app>.ear/<my-web-app>.war/lib
        Contains helper libraries used by that specific web app.
<my-app>.ear/<my-web-app>.war/classes
        Contains helper classes used by that specific web app.
<my-app>.ear/<my-web-app>.war/
        Holds your JSP, HTML, etc.


Note that not all files are required (e.g. orion-abc.xml files are
automatically generated by orion if not present).

Put only those you really need.

When you start your application, orion will generate a directory named
<my-app/ in the same directory that holds <my-app>.ear. It will also
generate a directory named <orion-path>/application-deployments/<my-app>/
When you modify classes, if they do not work as expected, you should
shutdown Orion and delete these two directories then restart.


The first week you will be a little bit confused, then when you remember
this map, everything will be easier.


I hope it helps,



Yves Bossel L.
Programmer
www.neoris.com - Business Technology Partners
Edificio Birmann 24, Sanchez Fontecilla 310, piso 7 (esq. Callao)
Las Condes, Santiago; CHILE
oficina: (56-2) 426-1260
email: [EMAIL PROTECTED]

Reply via email to