At line 1 changed 1 line. |
__NEW!__ For an up-to-date AppFuse on JBoss HowTo, see [Ken Yee's blog|http://www.keysolutions.com/blogs/kenyee.nsf/d6plinks/KKYE-697VEH]. |
!!JBoss 4.0.2 and AppFuse 1.8+ |
At line 3 changed 1 line. |
Below is a quick-n-dirty howto for setting up AppFuse on JBoss. Contributed by <a href="http://www.arc-mind.com/strutsCourse.htm">Rick Hightower</a>, who does Struts Training and Consulting. |
;:''Contributed by Ivan Coro (ivcoro at hotmail)'' |
At line 5 added 40 lines. |
(1) First, you need to copy the entire appfuse deployment dir under jboss deploy dir. The default deploy dir in JBoss is something like "/server/default/deploy/". I needed to rename the dir as "appfuse.war" (Notice the .war in the name) so that jboss can detect it and reload it without errors. |
|
(2) Next, you need to configure the datasource in jboss. For this, you need another file named "appfuse-ds.xml" and this file needs to be placed in the "deploy" dir of JBoss, at the same level of your deployed app dir, i.e., /server/default/deploy/. The contents of the file are: |
|
{{{ |
<datasources> |
<local-tx-datasource> |
<jndi-name>jdbc/appfuse</jndi-name> |
<connection-url>jdbc:mysql://localhost:3306/appfuse</connection-url> |
<driver-class>com.mysql.jdbc.Driver</driver-class> |
<user-name>test</user-name> |
<password>test</password> |
</local-tx-datasource> |
</datasources> |
}}} |
|
(3) Next, You need a new file named "jboss-web.xml" which should be inside WEB-INF dir of you app. This file is needed for jboss deployment. The contents of this file is as follows: |
|
{{{ |
<?xml version="1.0" encoding="UTF-8" ?> |
<jboss-web> |
<context-root>/appfuse</context-root> |
<resource-ref> |
<res-ref-name>jdbc/appfuse</res-ref-name> |
<res-type>javax.sql.DataSource</res-type> |
<jndi-name>java:jdbc/appfuse</jndi-name> |
</resource-ref> |
</jboss-web> |
}}} |
|
%%note __NOTE:__ You need to change the word "appfuse" to the name of the app instance you created if you are not using the default app that comes with appfuse.%% |
|
(4) Restart JBoss service. |
|
You might also checkout [Ken Yee's blog|http://www.keysolutions.com/blogs/kenyee.nsf/d6plinks/KKYE-697VEH] for how he automated deploying AppFuse to JBoss. |
|
For AppFuse versions 1.7 and below, please use the following howto: |
|
;:''Contributed by [Rick Hightower|http://jroller.com/page/RickHigh].'' |
|
At line 83 removed 8 lines. |
|
|
|
!!JBoss 4.0.2 and AppFuse 1.8+ |
|
;:''Contributed by Ivan Coro (ivcoro at hotmail)'' |
|
(1) First, you need to copy the entire appfuse deployment dir under jboss deploy dir. The default deploy dir in JBoss is something like "/server/default/deploy/". I needed to rename the dir as "appfuse.war" (Notice the .war in the name) so that jboss can detect it and reload it without errors. |
At line 92 removed 32 lines. |
(2) Next, you need to configure the datasource in jboss. For this, you need another file named "appfuse-ds.xml" and this file needs to be placed in the "deploy" dir of JBoss, at the same level of your deployed app dir, i.e., /server/default/deploy/. The contents of the file are: |
|
{{{ |
<datasources> |
<local-tx-datasource> |
<jndi-name>jdbc/appfuse</jndi-name> |
<connection-url>jdbc:mysql://localhost:3306/appfuse</connection-url> |
<driver-class>com.mysql.jdbc.Driver</driver-class> |
<user-name>test</user-name> |
<password>test</password> |
</local-tx-datasource> |
</datasources> |
}}} |
|
(3) Next, You need a new file named "jboss-web.xml" which should be inside WEB-INF dir of you app. This file is needed for jboss deployment. The contents of this file is as follows: |
|
{{{ |
<?xml version="1.0" encoding="UTF-8" ?> |
<jboss-web> |
<context-root>/appfuse</context-root> |
<resource-ref> |
<res-ref-name>jdbc/appfuse</res-ref-name> |
<res-type>javax.sql.DataSource</res-type> |
<jndi-name>java:jdbc/appfuse</jndi-name> |
</resource-ref> |
</jboss-web> |
}} |
|
%%note __NOTE:__ You need to change the word "appfuse" to the name of the app instance you created if you are not using the default app that comes with appfuse.%% |
|
(4) Restart JBoss service. |
|