[JBoss Seam] - default equals() doesn't behave as expected for javaBean com
by matt.drees
I'm not sure whether this is a bug or not, but it occupied a chunk of my time trying to debug this, and I thought others should be aware of it.
The javassist proxy for javaBeans components interferes with the default equals() method. After some interceptions, something like instance_javassist.equals(instance) is called, which fails, because they're different instances.
You can see this with something like this (which fails):
| public class PingTest extends SeamTest {
|
| @Test
| public void test() throws Exception {
| new FacesRequest() {
| @Override
| protected void invokeApplication() {
| //call action methods here
| Ping ping = (Ping) getValue("#{ping}");
| Collection<Ping> pingSet = new ArrayList<Ping>();
| pingSet.add(ping);
| assert ping.equals(ping);
| }
| }.run();
| }
| }
|
| @Name("ping")
| public class Ping {
|
| @Logger private Log log;
|
| @In FacesMessages facesMessages;
|
| public void ping()
| {
| log.info("ping.ping() action called");
| facesMessages.add("ping");
| }
|
|
| }
|
If it's a bug, I'll file it in jira.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4041057#4041057
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4041057
17 years, 8 months
[JBoss jBPM] - JTA Transactional Issues with Weblogic
by CatlinIT
When querying JBPM objects from an application deployed in Weblogic we get the following exception:
org.hibernate.HibernateException: Unable to locate current JTA transaction
at org.hibernate.context.JTASessionContext.currentSession()Lorg.hibernate.classic.Session;(J
TASessionContext.java:61) at org.hibernate.impl.SessionFactoryImpl.getCurrentSession()Lorg.hibernate.classic.Session;(
SessionFactoryImpl.java:542) at org.jbpm.persistence.db.DbPersistenceService.getSession()Lorg.hibernate.Session;(DbPersis
tenceService.java:103) at org.jbpm.JbpmContext.getSession()Lorg.hibernate.Session;(JbpmContext.java:506) at com.catlin.workflow.engine.jbpm.JbpmWorkflowEngine.findTasks(Lcom.catlin.workflow.engine.
search.WorkflowSearchCriteria;)Ljava.util.List;(JbpmWorkflowEngine.java:96) at com.catlin.workflow.search.impl.FindIncompleteTasksByUser.search(Ljava.util.Map;)Ljava.ut
il.Collection;(FindIncompleteTasksByUser.java:37) at com.catlin.ui.workflow.WorkflowDelegate.searchOutstandingTasksByUser(Ljava.lang.String;)L
java.util.Collection;(WorkflowDelegate.java:24) at com.catlin.ui.home.NewSplashAction.initUserTasks(Lcom.catlin.ui.home.NewSplashForm;)V(New
SplashAction.java:69)
Here are our settings from our hibernate config:
hibernate.connection.datasource = SWANBusJTSSource
hibernate.current_session_context_class = jta
hibernate.transaction.factory_class = org.hibernate.transaction.JTATransactionFactory
jta.userTransaction = javax.transaction.UserTransaction
hibernate.transaction.manager_lookup_class = org.hibernate.transaction.WeblogicTransactionManagerLookup
....and from our jbpm config
bean class = org.jbpm.persistence.db.DbPersistenceServiceFactory
isTransactionEnabled = false
isCurrentSessionEnabled = true
dataSourceJndiName = SWANBusJTSSource
Thanks in advance
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4041054#4041054
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4041054
17 years, 8 months