Running the Asynchronous Aspect or any others aspects outside of JBOSS server 
is quite straitghforward.

They are differents options of deployment based on your requirements (See 
Reference doc Chap 10)

I personally tested two configurations with Tomcat 5.0


JDK 1.4 using the precompiler.
------------------------------
Create a war file as follow :
WEB-INF/lib/concurrent.jar
WEB-INF/lib/jboss-aop.jar
WEB-INF/lib/jboss-aspect-library.jar
WEB-INF/lib/jboss-common.jar
WEB-INF/lib/javassist.jar
WEB-INF/lib/trove.jar

WEB-INF/classes/META-INF/jboss-aop.xml
WEB-INF/classes/...

JDK 1.5 (Loadtime)
-------
Modify the classpath as follow ( Use the Configure Tomcat dialogbox)
-Djava.system.class.loader=org.jboss.aop.standalone.SystemClassLoader

Create a war file as follow :
WEB-INF/lib/concurrent.jar
WEB-INF/lib/jboss-aop-jdk50.jar
WEB-INF/lib/jboss-aspect-library-jdk50.jar
WEB-INF/lib/jboss-common.jar
WEB-INF/lib/javassist.jar
WEB-INF/lib/trove.jar

WEB-INF/classes/META-INF/jboss-aop.xml
WEB-INF/classes/...


An alternative for both options (JDK 1.4/JDK 1.5) is to install 
the libraries under CATALINA_HOME/common/endorsed and the jboss-aop.xml
under CATALINA_HOME/common/classes so u don't need to package them with the war 
file.


2/The Asynchronous Aspect does catch all exceptions.
So in order to test ,if the asynchronous method raises an exception do the 
following :

For example if the method execute was annotated with the asynchronous 
annotation.
POJO p = new POJO();
long value=p.execute();
AsynchronousFacade facade = (AsynchronousFacade)p;

// Test if the method raised an exception and get the Exception object.
if (p.getResponseCode()==AsynchronousConstants.EXCEPTIONCAUGHT)
{
((Exception)p.getResponseObject()).printStackTrace();
}

The following constants are also available :
 
AsynchronousConstants.OK         (Asynchronous method completed succesfully)
AsynchronousConstants.TIMEOUT    (Asynchronons method completed but did timeout)
AsynchronousConstants.NOVALUE    (Asynchronous method still running)

I hope it helps .

Rgds-Claude

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3854421#3854421

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3854421


-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to