Overview
- Home
- Specifications
- xPetstore-EJB
- xPetstore-Servlet
- Source Code
- Metrics
- ToDo
Project
- Mailing Lists
- Source Repository
- Issue Tracking
- Project Team
- References
Installation
- Download
- Configuring JBoss 3.0.x
- Configuring WebLogic 7.x
- Configuring Orion 2.x
- Configuring Tomcat 4.x
- Running xPetstore
|
Configuring JBoss-3.x
|
-
Set
JBOSS_HOME
Make sure that the variable JBOSS_HOME is set to the JBoss home directory
-
Create the JBoss xpetstore server
Copy recursively JBOSS_HOME/server/default to JBOSS_HOME/server/xpetstore
-
Configure JMS
Edit JBOSS_HOME/server/xpetstore/deploy/destinations-service.xml
to create JMS queues queue/order and queue/mail .
JBOSS_HOME/server/xpetstore/deploy/destinations-service.xml should look like this:
<server>
...
<mbean code="org.jboss.mq.server.jmx.Queue"
name="jboss.mq.destination:service=Queue,name=order">
<attribute name="JNDIName">queue/order</attribute>
<depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
</mbean>
<mbean code="org.jboss.mq.server.jmx.Queue"
name="jboss.mq.destination:service=Queue,name=mail">
<attribute name="JNDIName">queue/mail</attribute>
<depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
</mbean>
...
</server>
-
Configure JDBC
- Copy the JDBC driver to JBOSS_HOME/server/xpetstore/lib
- Edit JBOSS_HOME/server/xpetstore/deploy/db.name-service.xml to
create the datasource java:/xpetstoreDS
JBOSS_HOME/server/xpetstore/deploy/db.name-service.xml should look like this:
<server>
<mbean
code="org.jboss.resource.connectionmanager.LocalTxConnectionManager"
name="jboss.jca:service=LocalTxCM,name=SapdbDS">
<depends optional-attribute-name="ManagedConnectionFactoryName">
<!--embedded mbean-->
<mbean
code="org.jboss.resource.connectionmanager.RARDeployment"
name="jboss.jca:service=LocalTxDS,name=SapdbDS"
>
<attribute name="JndiName">xpetstoreDS</attribute>
<attribute name="ManagedConnectionFactoryProperties">
<properties>
<config-property name="ConnectionURL" type="java.lang.String">your-database-url</config-property>
<config-property name="DriverClass" type="java.lang.String">your-jdbc-driver</config-property>
<!--set these only if you want only default logins, not through JAAS -->
<config-property name="UserName" type="java.lang.String">your-username</config-property>
<config-property name="Password" type="java.lang.String">your-password</config-property>
</properties>
</attribute>
....
</mbean>
</server>
-
Configure JavaMail
Create the MailSesion java/:Mail .
Make sure that JBOSS_HOME/server/xpetstore/deploy/mail-service.xml look like this:
<server>
<classpath codebase="lib"
archives="mail.jar, activation.jar, mail-plugin.jar"/>
<mbean code="org.jboss.mail.MailService"
name="jboss:service=Mail">
<attribute name="JNDIName">Mail</attribute>
<attribute name="User">your-user-name</attribute>
<attribute name="Password">your-password</attribute>
<attribute name="Configuration">
<configuration>
<property name="mail.store.protocol" value="pop3"/>
<property name="mail.transport.protocol" value="smtp"/>
<property name="mail.user" value="your-username"/>
<property name="mail.pop3.host" value="your-pop3-host"/>
<property name="mail.smtp.host" value="your-smtp-host"/>
<property name="mail.from" value="noreply@xpetstore.sourceforge.net"/>
<property name="mail.debug" value="false"/>
</configuration>
</attribute>
</mbean>
</server>
|
|
|