|
Installing the EJB examples
This article describes how to install the EJB examples shipped with the Orion distribution.
1
Running the Product Client
2 Running the Cart client
3 Installing the EJBUserManager
To install the EJBUserManager, add the following to META-INF/
orion-application.xml:
<user-manager class="com.evermind.ejb.EJBUserManager"> <property name="home" value="com.evermind.ejb.EJBUser" /> <property name="defaultGroups" value="users" /> </user-manager>
|
Listing 5: installing the EJBUserManager
4 Running the News application
-
Make sure that a valid DataSource is available.
For information on how to configure a data-source please see this guide.
-
If the news application is not already deployed this is done by adding the lines given in listing 6 below to the server.xml configuration file found in the config/ directory.
For more information on how to deploy applications, see this guide.
-
Bind the web-app to the default site, this is done by adding the lines igven in listing 7 below to the default-web-site.xml configuration file found in the config/ directory.
For more information on how to bind web-modules, see this guide.
-
Start Orion up, this should auto-deploy the application.
-
Access http://localhost/news/ and verify that it works.
<application name="news" path="../applications/news.ear" />
|
Listing 6: Deploying the news application
<web-app application="news" name="news-web" root="/news" />
|
Listing 7: Binding the web-module to the site.
5 Running the ATM application
The ATM sample application simulates a Automatic Teller Machine. The application uses MDBs, Local interfaces, Session Syncronization, Automatic primary keys, Usermanagement and form-based authentication amongst other tecnhiques.
-
Make sure that a valid DataSource is available.
For information on how to configure a data-source please see this guide.
-
Add a valid mail configuration to the application.xml configuration file found in the config/ directory. A example is given in listing 8 below.
-
If the ATM application is not already deployed this is done by adding the lines given in listing 9 below to the server.xml configuration file found in the config/ directory.
For more information on how to deploy applications, see this guide.
-
Bind the web-app to the default site, this is done by adding the lines igven in listing 10 below to the default-web-site.xml configuration file found in the config/ directory.
For more information on how to bind web-modules, see this guide.
-
Start Orion up, this should auto-deploy the application.
-
Access http://localhost/atm/ and verify that it works.
<mail-session location="mail/MailSession" smtp-host="mail.mycompany.com"> <property name="mail.transport.protocol" value="smtp" /> <property name="mail.smtp.from" value="admin@mycompany.com" /> <property name="mail.from" value="sales@mycompany.com" /> </mail-session>
|
Listing 8: Configuring a mail resource.
<application name="atm" path="../applications/atm.ear" />
|
Listing 9: Deploying the ATM application
<web-app application="atm" name="atm-web" root="/atm" />
|
Listing 10: Binding the web-module to the site.
Copyright
2003 IronFlare AB
|