[jBPM Users] - Re: [jBPM4] final state when async node is used
by kukeltje
Your original question was:
anonymous wrote : My question is: how do we know that a workfow is ended ?
My answer was:
anonymous wrote :
| if you retrieve the processinstance by id and it is null it was either not there to begin with or it is ended. If you are not sure, you can always check in the history. It should be there then.
This is valid AND the truth. (Ab) using the getState is not the correct way, since if a process is really ended, the assertTrue(processInstance.isEnded());
would produce a(n?) NPE since it is directly moved to the history table.
So your reply seemed not related to me and I did not respond.
Btw, If you post in the forum and make a Jira issue which is related, you can point that out in the jira issue. There is a specific field for that.
Regarding tests in general, yes, for tests you have to know the workflow. That is what tests are for. So that is not an issue either (imo)
If you could refine the test some more so the last statement does throw an NPE and the getState() still is not equal to 'completed', please get back to us.
Hope this helps to clarify some things.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4255145#4255145
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4255145
15 years, 4 months
[Persistence] - ClassNotFoundException Moving Persistence.xml From EJB/META-
by wluque
Hi, i have a application with the next structure (work fine un jboss 4.2.2.ga) :
..FMK-EAR
......fmk-war
......fmk-seam ( Seam Actions Ejb )
......fmk-sessionEjb ( Ejb beans )
......fmk-zentities ( Ejb with the entities definition )
......META-INF
............application.xml
............jboss-app.xml
............persistence.xml ( move recently )
In fmksessionEjb i have @PersistenceContext(unitName = "ejb3FMK") , so I move the persistence.xml from fmk-zentities/META-INF to FMK-EAR/META-INF.
I read in some post, that this is necessary for persistence unit is visible to fmk-sessionEjb.
Now i have the next error :
javax.persistence.PersistenceException: [PersistenceUnit: ejb3FMK] class or package not found
....
Caused by: java.lang.ClassNotFoundException: fmk-zentities.jar.com.multiSistemas.fmk.entity.security.UserSecuritySpaceAccess from ...
The class com.multiSistemas.fmk.entity.security.UserSecuritySpace exists in fmk-zentities.jar .
What is wrong? any idea?
Thank in advance
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4255137#4255137
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4255137
15 years, 4 months
[Javassist Users] - Field access like in GluonJ
by Corifeo
I try to implement a field access as the @Get and @Set Listener-Annotations in GluonJ, directly with Javassist.
I looked into the source code how GluonJ performs this, but I can't get it running - and don't get the exact point.
e.g. Class A
{
String myString;
}
Does anybody know:
- is it possible to only modify Class A, e.g. by injecting a bytecode method invocation, to 'redirect' every possible access (set/get) on myString? Does GluonJ so? I found snippets like 'constPool.addMethodrefInfo(classIndex, nt); or 'codeConverter2.redirectFieldAccess(superOf, m.getDeclaringClass(), fname);
- Or is it only possible to substitute the field accesses in specified classes/methods, and GluonJ substitute these brute-force in every class that is processed by the class loader...which is not so elegant, but perhaps the only possibility
- What are the necessary Javassist invocations to achieve such Listeners? I can't find an according snippet in the tutorial. Is it possible to paste one here?
Thanks in advance!
Christian
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4255136#4255136
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4255136
15 years, 4 months
[JNDI and Naming] - JNDI Lookup in multi-classloader environment
by praveenbalaji
Software Version: JBoss Client from JBoss 4.2.2 drop.
I'm trying to do a JNDI lookup of a JMS Connection Factory in my component. This is a plain Java component. I am trying to do a JNDI lookup from a plain Java object. Several of my componnets can run in the same JVM under different classloaders. I'm loading jboss client jars in each of these component classloaders such that each classloader has its own copy of client jars. Each component does a JNDI lookup for the same named object.
The second (and consequent) component that does a lookup fails with a ClassCastException. The second component is looking up an object created by the first component. Though the classname matches, the classloader is different and hence the ClassCastException.
| caused by: javax.naming.NamingException: Could not dereference object [Root exception is java.lang.ClassCastException: org.jboss.naming.LinkRefPair]
| at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1298)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:763)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
| at javax.naming.InitialContext.lookup(InitialContext.java:351)
| ...
| ...
| at sun.rmi.transport.Transport$1.run(Transport.java:153)
| at java.security.AccessController.doPrivileged(Native Method)
| at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
| at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
| at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: java.lang.ClassCastException: org.jboss.naming.LinkRefPair
| at org.jboss.naming.LinkRefPairObjectFactory.getObjectInstance(LinkRefPairObjectFactory.java:66)
| at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
| at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1273)
| at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1290)
| ... 70 more
|
|
I looked at the JBoss source and the object returned by the lookup at org.jnp.interfaces.NamingContext.lookup(javax.naming.Name) (line 667) is fetching the offending object.
Is there a way to provide isolation at component level in the client code? I see there is a way to do it for components (enterprise applications) running under the J2EE container as stated at http://www.jboss.org/community/wiki/classloadingconfiguration
Please note that unfortunately for me, it is not an option for me to load the jboss client jars under the JRE's ext classloader which is the ancestor of all my component classloaders. I have to provide isolation at the component level.
Thanks
Praveen
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4255132#4255132
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4255132
15 years, 4 months