[JBoss JIRA] Created: (JBPM-956) jBPM 3.2.x: enhance MockConnection to allow for using JDK 1.6
by Arjan van Bentem (JIRA)
jBPM 3.2.x: enhance MockConnection to allow for using JDK 1.6
-------------------------------------------------------------
Key: JBPM-956
URL: http://jira.jboss.com/jira/browse/JBPM-956
Project: JBoss jBPM
Issue Type: Feature Request
Components: Core Engine
Affects Versions: jBPM jPDL 3.2
Environment: Win32, JDK 1.6
Reporter: Arjan van Bentem
Assigned To: Tom Baeyens
Priority: Optional
Since JDK 1.6, the interface java.sql.Connection includes numerous new methods, such as createArray and createBlob. Adding some dummy methods to org.jbpm.persistence.db.MockConnection allows for using JDK 1.6
API: http://java.sun.com/javase/6/docs/api/java/sql/Connection.html
FIX: add the following lines to http://fisheye.labs.jboss.com/browse/JBPM/jbpm.3/jpdl/jar/src/test/java/o...
public Array createArrayOf(String typeName, Object[] elements) throws SQLException {
throw new UnsupportedOperationException();
}
public Blob createBlob() throws SQLException {
throw new UnsupportedOperationException();
}
public Clob createClob() throws SQLException {
throw new UnsupportedOperationException();
}
public NClob createNClob() throws SQLException {
throw new UnsupportedOperationException();
}
public SQLXML createSQLXML() throws SQLException {
throw new UnsupportedOperationException();
}
public Struct createStruct(String typeName, Object[] attributes) throws SQLException {
throw new UnsupportedOperationException();
}
public Properties getClientInfo() throws SQLException {
throw new UnsupportedOperationException();
}
public String getClientInfo(String name) throws SQLException {
throw new UnsupportedOperationException();
}
public boolean isValid(int timeout) throws SQLException {
throw new UnsupportedOperationException();
}
public void setClientInfo(Properties properties) throws SQLClientInfoException {
throw new UnsupportedOperationException();
}
public void setClientInfo(String name, String value) throws SQLClientInfoException {
throw new UnsupportedOperationException();
}
public boolean isWrapperFor(Class arg0) throws SQLException {
throw new UnsupportedOperationException();
}
public Object unwrap(Class arg0) throws SQLException {
throw new UnsupportedOperationException();
}
Just for the JIRA search:
The type MockConnection must implement the inherited abstract method Connection.createArrayOf(String, Object[])
The type MockConnection must implement the inherited abstract method Connection.createBlob()
The type MockConnection must implement the inherited abstract method Connection.createClob()
The type MockConnection must implement the inherited abstract method Connection.createNClob()
The type MockConnection must implement the inherited abstract method Connection.createSQLXML()
The type MockConnection must implement the inherited abstract method Connection.createStruct(String, Object[])
The type MockConnection must implement the inherited abstract method Connection.getClientInfo()
The type MockConnection must implement the inherited abstract method Connection.getClientInfo(String)
The type MockConnection must implement the inherited abstract method Connection.isValid(int)
The type MockConnection must implement the inherited abstract method Connection.setClientInfo(Properties)
The type MockConnection must implement the inherited abstract method Connection.setClientInfo(String, String)
The type MockConnection must implement the inherited abstract method Wrapper.isWrapperFor(Class)
The type MockConnection must implement the inherited abstract method Wrapper.unwrap(Class)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 6 months
[JBoss JIRA] Created: (JBPM-964) NullPointerException in ContextInstance.setVariable(java.lang.String name, java.lang.Object value) method.
by Vt Ysh (JIRA)
NullPointerException in ContextInstance.setVariable(java.lang.String name, java.lang.Object value) method.
----------------------------------------------------------------------------------------------------------
Key: JBPM-964
URL: http://jira.jboss.com/jira/browse/JBPM-964
Project: JBoss jBPM
Issue Type: Bug
Components: Core Engine
Affects Versions: jBPM jPDL 3.2
Environment: Windows XP SP2, jbpm-jpdl-3.2.GA
Reporter: Vt Ysh
Assigned To: Tom Baeyens
Priority: Trivial
NullPointerException occurs when trying to set variable value of byte[] type in ContextInstance. Error happens only in one case, then value is not null and has zero length
Here is a junit TestCase which represents an error
import junit.framework.TestCase;
import org.jbpm.context.exe.ContextInstance;
import org.jbpm.graph.def.ProcessDefinition;
import org.jbpm.graph.exe.ProcessInstance;
public class ContextTest extends TestCase {
public void testContext() {
ProcessDefinition processDefinition = ProcessDefinition.parseXmlString(
"<process-definition>" +
" <start-state>" +
" <transition to='s' />" +
" </start-state>" +
" <state name='s'>" +
" <transition to='end' />" +
" </state>" +
" <end-state name='end' />" +
"</process-definition>"
);
ProcessInstance processInstance =
new ProcessInstance(processDefinition);
ContextInstance contextInstance =
processInstance.getContextInstance();
try
{
contextInstance.setVariable("test", new byte[0]);
fail("Should raise NullPointer exception");
}catch(NullPointerException e)
{
e.printStackTrace();
}
processInstance.signal();
}
}
Console output:
java.lang.NullPointerException
at java.util.ArrayList.<init>(ArrayList.java:133)
at org.jbpm.bytes.ByteArray.<init>(ByteArray.java:60)
at org.jbpm.context.log.variableinstance.ByteArrayUpdateLog.<init>(ByteArrayUpdateLog.java:41)
at org.jbpm.context.exe.variableinstance.ByteArrayInstance.setObject(ByteArrayInstance.java:44)
at org.jbpm.context.exe.VariableInstance.setValue(VariableInstance.java:137)
at org.jbpm.context.exe.VariableInstance.create(VariableInstance.java:74)
at org.jbpm.context.exe.VariableContainer.setVariableLocally(VariableContainer.java:157)
at org.jbpm.context.exe.VariableContainer.setVariable(VariableContainer.java:45)
at org.jbpm.context.exe.ContextInstance.setVariable(ContextInstance.java:166)
at org.jbpm.context.exe.ContextInstance.setVariable(ContextInstance.java:156)
...
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 6 months
[JBoss JIRA] Created: (JBPM-792) Add support for JNDI bound SessionFactory
by C??dric Vidal (JIRA)
Add support for JNDI bound SessionFactory
-----------------------------------------
Key: JBPM-792
URL: http://jira.jboss.com/jira/browse/JBPM-792
Project: JBoss jBPM
Issue Type: Feature Request
Components: Core Engine
Reporter: C??dric Vidal
Assigned To: Tom Baeyens
Today, jBPM manages the configuration of Hibernate which is fine in simple applications where jBPM is the main piece but in a enterprise application where jBPM is one of the many modules that are using Hibernate as a persistence mechanism, you don't want to configure your hibernate SessionFactory multiple times, so you want to configure your SessionFactory once, bind it to JNDI and tell jBPM to use it.
It would be great if out of the box, jBPM would be able to lookup the SessionFactory it uses out of JNDI instead of configuring it locally.
Regards,
Cédric
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 6 months
[JBoss JIRA] Created: (JBPM-961) Save not required on jbpmContext operations
by Jeff DeLong (JIRA)
Save not required on jbpmContext operations
-------------------------------------------
Key: JBPM-961
URL: http://jira.jboss.com/jira/browse/JBPM-961
Project: JBoss jBPM
Issue Type: Bug
Components: Core Engine
Affects Versions: jBPM jPDL 3.2
Reporter: Jeff DeLong
Assigned To: Tom Baeyens
Priority: Minor
Save (or ForUpdate methods) do not appear to be required on jbpmContext operations.
In the javadocs for JbpmContext it says
...do your process operations...
// in case you update a process object that was not fetched
// with a .. ForUpdate method, you have to save it
jbpmContext.save(processInstance);
...
"All of the ...ForUpdate(...) methods will automatically save the loaded object at jbpmContext.close();
I have verified through JUnit tests that indeed saving of ProcessInstance and TaskInstance is not required, the state will still be persisted.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 6 months