[JBoss AOP] - Hot deployment in Jboss for AOP applications
by Yuvaraj
hi,
I am a newbie to AOP and I liked to know how to do hot deployment in jboss for aop applications. Please help me.
I am using jboss 4.2.1 and jboss AOP 1.5.6 (since our product already in production)
I will explain the steps I had followed. Please correct or provide the steps.Thanks.
1. I have an aspect (LoggingAspect.java) and a POJO(POJO.java).
2. precompiled it using aopc with the following the jboss-aop.xml file
(prepared the POJO for all join points)
| <aop> <prepare expr="all(POJO)"/> </aop>
|
3. Deployed the aspect.jar (contains LoggingAspect.java) and aopTest.war in jboss/server/default/deploy (contains the POJO class and a test.jsp which calls the POJO methods)
4. When I try invoking the test.jsp, I am able to see the aspect working properly as expected. Able to see the log statements (test-aop.xml in deploy specifies the point cuts for POJO methods)
5. I tired undeploy (deleted the test-aop.xml) and as expected the aspect is not working.
My problem is when i deploy again a new test-aop.xml with different point cuts, this time the aspect is still not working.
I expect it will pick the new point cuts mentioned in the test-aop.xml.
Please correct me if i am wrong and Please let me know the correct deployment structure for hot deployment.
NOTE: when i tried the same with stand alone application it works. Prepared the POJO while precompiling. And run with jboss-aop.xml. It works. Again didnt compile, just run with a new jboss-aop.xml with different point cuts, it still works.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4235152#4235152
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4235152
16 years, 10 months
[JBoss jBPM] - Re: How to get TaskInstance in a ActionHandler
by freak182
Hello,
That works thanks. Now my question is, How to end task in Timers? Like the example above code i get the TaskInstance so that i can end that task when leaving for the next task during timeout.
| final Collection<TaskInstance> tasks = context.getTaskMgmtInstance().getTaskInstances();
|
| for(TaskInstance inst : tasks){
| inst.end();
| }
|
this code end the task but proceed to the default transition not to "to approver B". same behavior occur from below code.
|
| final Collection<TaskInstance> tasks = context.getTaskMgmtInstance().getTaskInstances();
| final Token token = context.getToken();
|
| //token.signal();
| for(TaskInstance inst : tasks){
|
| inst.end();
| }
|
| context.getJbpmContext().save(token.getProcessInstance());
|
But when there is no ActionHandler attached, i doesnt end the task instead the task remained on the user and proceed to the next task with different user.
Thanks a lot.
Cheers.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4235148#4235148
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4235148
16 years, 10 months
[Installation, Configuration & DEPLOYMENT] - Re:
by alskor
I changed jndi.properties to have default "Standard config" values:
java.naming.factory.initial=org.jboss.iiop.naming.ORBInitialContextFactory
| java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
|
and now I'm back to where I started when I copied "standard" config to my own and then copied my EARs and services xml configs:
| javax.naming.NoInitialContextException: Cannot instantiate class: org.jboss.iiop.naming.ORBInitialContextFacto
| ry [Root exception is java.lang.ClassNotFoundException: org.jboss.iiop.naming.ORBInitialContextFactory]
| at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:657)
| at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
| at javax.naming.InitialContext.init(InitialContext.java:223)
| at javax.naming.InitialContext.<init>(InitialContext.java:175)
| at com.starview.dm.collectionmgt.StarcoreRootNode.<init>(StarcoreRootNode.java:54)
| .......
| .......
| Caused by: java.lang.ClassNotFoundException: org.jboss.iiop.naming.ORBInitialContextFactory
| at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
| at java.security.AccessController.doPrivileged(Native Method)
| at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
| at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
| at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
| at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
| at java.lang.Class.forName0(Native Method)
| at java.lang.Class.forName(Class.java:242)
| at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:42)
| at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:654)
|
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4235136#4235136
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4235136
16 years, 10 months
[Installation, Configuration & DEPLOYMENT] - Re:
by alskor
interesting:
I added this code right in front the InitialContext creation:
// new code
| String className = "org.jnp.interfaces.NamingContextFactory";
| System.out.println("trying to load class: " + className);
| Class c = Class.forName(className);
|
| System.out.println("loaded class: " + c + " methods: " + c.getMethods().length);
|
| // old code
| InitialContext ctx = new InitialContext();
|
the output is:
[STDOUT] trying to load class: org.jnp.interfaces.NamingContextFactory
| [STDOUT] loaded class: class org.jnp.interfaces.NamingContextFactory methods: 11
so, apparently NamingContextFactory class IS loaded and visible to the current class loader. then why in the world isn't it visible one line below, when I try "new InitialContext()" ??
javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory [Roo
| t exception is java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory]
| at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:657)
| at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
| at javax.naming.InitialContext.init(InitialContext.java:223)
| at javax.naming.InitialContext.<init>(InitialContext.java:175)
| at com.starview.dm.collectionmgt.StarcoreRootNode.<init>(StarcoreRootNode.java:54)
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4235130#4235130
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4235130
16 years, 10 months