Raible's Wiki

Raible Designs
Wiki Home
News
Recent Changes

AppFuse

Homepage
  - Korean
  - Chinese
  - Italian
  - Japanese

QuickStart Guide
  - Chinese
  - French
  - German
  - Italian
  - Korean
  - Portuguese
  - Spanish
  - Japanese

User Guide
  - Korean
  - Chinese

Tutorials
  - Chinese
  - German
  - Italian
  - Korean
  - Portuguese
  - Spanish

FAQ
  - Korean

Latest Downloads

Other Applications

Struts Resume
Security Example
Struts Menu

Set your name in
UserPreferences


Referenced by
AppFuseSupport




JSPWiki v2.2.33

[RSS]


Hide Menu

AppFuseOnJBoss


Difference between version 22 and version 14:

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].
!!AppFuse 1.8+ and JBoss 4.0.2
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 changed 1 line.
!!AppFuse Security
(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. You can also simply deploy the WAR to this directory. To enable automatic refreshing of JBoss AS WAR deployments add the following entries to your configuration files.
At line 7 added 77 lines.
* Add your JBoss home directory to build.properties:
{{{jboss.home=D:/JBossAS-4.0.3-SP1/server/default}}}
* Add the following Ant targets to the build.xml in the root of your project:
{{{
<!-- =================================================================== -->
<!-- The "jboss-undeploy" target deletes the web application archive -->
<!-- from the JBoss servlet container. -->
<!-- =================================================================== -->
<target name="jboss-undeploy" if="jboss.home"
description="Undeploy '${webapp.name}.war' from JBoss AS">
<echo message="Undeploying '${webapp.name}.war' from JBoss AS..."/>
<delete file="${jboss.home}/deploy/${webapp.war}"/>
</target>
<!-- =================================================================== -->
<!-- Refresh - Stops JBoss AS, and refreshes everything -->
<!-- =================================================================== -->
<target name="jboss-refresh" depends="jboss-undeploy,clean,jboss-deploy"
description="Undeploys, cleans, then re-deploys"/>
<!-- =================================================================== -->
<!-- The "jboss-deploy" target deploys the web application in the war -->
<!-- format to JBoss AS. -->
<!-- =================================================================== -->
<target name="jboss-deploy" depends="package-web" if="jboss.home"
description="Deploy '${webapp.name}.war' to JBoss AS">
<echo message="Deploying '${webapp.name}.war' to JBoss AS..."/>
<copy file="${webapp.dist}/${webapp.war}"
todir="${jboss.home}/deploy"/>
</target>
}}}
* Run {{ant jboss-refresh}} to refresh your webapp deployment.
%%note __NOTE:__ If you're using AppFuse 1.9+ - you're done! If you'd rather use a JNDI DataSource than the Spring-managed connection pool, you can follow the instructions below. You'll also need to change ''applicationContext-resources.xml'' so the dataSource bean reads from JNDI.%%
(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.
!!AppFuse 1.7 and JBoss 3.x.
;:''Contributed by [Rick Hightower|http://jroller.com/page/RickHigh].''
!AppFuse Security
At line 58 changed 1 line.
I subclassed UserManagerImpl, and created a version specific to JBoss, then I changed UserManagerImpl to use a stub method called flushAuthCache.
I subclassed UserManagerImpl, and created a version specific to JBoss, then I changed UserManagerImpl to use a stub method called flushAuthCache. UserManagerJBossSpecific invalidates the user cache using JMX. JBoss is pretty cool!
At line 60 removed 2 lines.
UserManagerJBossSpecific invalidates the user cache using JMX. JBoss is pretty cool!
At line 149 added 1 line.
!Logging
At line 75 removed 2 lines.
!!Logging
At line 83 changed 26 lines.
!!JBoss 4.0 Changes to AppFuse Security Instructions
Contributed by Josh Sents
In the login-config.xml change
{{{ <module-option name = "dsJndiName">jdbc/mysql</module-option> }}}
To
{{{ <module-option name = "dsJndiName">java:/jdbc/mysql</module-option> }}}
Create a WEB-INF/[jboss-web.xml] file inside Appfuse.jar with the following contents
{{{
<?xml version="1.0" encoding="UTF-8" ?>
<jboss-web>
<context-root>/appfuse</context-root>
<resource-ref>
<res-ref-name>jdbc/mysql</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<jndi-name>java:jdbc/mysql</jndi-name>
</resource-ref>
<security-domain>java:/jaas/appfuse</security-domain>
</jboss-web>
}}}

Back to AppFuseOnJBoss, or to the Page History.