[JBoss JIRA] Created: (JBPM-1701) in WireContext: bug when elements inside a list are referenced from outside the list.
by Guillaume Porcher (JIRA)
in WireContext: bug when elements inside a list are referenced from outside the list.
-------------------------------------------------------------------------------------
Key: JBPM-1701
URL: https://jira.jboss.org/jira/browse/JBPM-1701
Project: JBoss jBPM
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: PVM
Reporter: Guillaume Porcher
Priority: Critical
In this example:
public void testNamedElements() {
String contextText =
"<objects>" +
" <list name='l'>" +
" <object class='java.lang.Object' name='s'/>" +
" </list>" +
" <ref name='r' object='s' />" +
"</objects>";
WireContext wireContext = createWireContext(contextText);
assertNotNull(wireContext.get("s"));
assertNotNull(wireContext.get("l"));
assertNotNull(wireContext.get("r"));
assertSame(wireContext.get("s"), wireContext.get("r"));
wireContext = createWireContext(contextText);
assertNotNull(wireContext.get("r"));
assertNotNull(wireContext.get("l"));
assertNotNull(wireContext.get("s"));
assertSame(wireContext.get("s"), wireContext.get("r"));
}
the last assertion fails.
If the reference is accessed first, the object s is created when the reference is created, and then when the list is created.
If the list is created first, the reference uses the object in the list.
To fix this bug, I see 2 solutions:
- we can prevent the user from defining objects with names in lists.
- we can fix the creation of the list to check if some of the elements have already been created.
I think the first solution is better. If an element can be shared by more than one entity, it should be defined outside of all the entities and the entities should use ObjectReferences to access the shared element.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 6 months
[JBoss JIRA] Created: (JBPM-2022) EnvironmentFactory cannot be bound to JBNDI
by Heiko Braun (JIRA)
EnvironmentFactory cannot be bound to JBNDI
-------------------------------------------
Key: JBPM-2022
URL: https://jira.jboss.org/jira/browse/JBPM-2022
Project: JBoss jBPM
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Core Engine
Reporter: Heiko Braun
Assignee: Heiko Braun
Fix For: jBPM 4.0.0.GA
Bonanova:enterprise hbraun$ mvn -Djboss.bind.address=localhost -Dtest=CommandExecutorTest test
10:13:45,303 ERROR [STDERR] Feb 6, 2009 10:13:45 AM org.jbpm.log.Jdk14Log info
INFO: WARNING: environment factory binding failed
javax.naming.CommunicationException [Root exception is java.io.NotSerializableException: org.jbpm.pvm.internal.svc.DefaultCommandService]
at org.jnp.interfaces.NamingContext.bind(NamingContext.java:664)
at org.jnp.interfaces.NamingContext.bind(NamingContext.java:598)
at javax.naming.InitialContext.bind(InitialContext.java:359)
at org.jbpm.enterprise.internal.ejb.CommandExecutorSLSB.bind(CommandExecutorSLSB.java:184)
at org.jbpm.enterprise.internal.ejb.CommandExecutorSLSB.ejbCreate(CommandExecutorSLSB.java:149)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 6 months