[JBoss-user] [JBoss Portal] - Re: Transaction problems with JBoss Portal + JBPM

2005-09-29 Thread [EMAIL PROTECTED]
what you can try is to use an EJB session bean with a simple method that you 
cann and has a declarative transaction attribute to REQUIRES_NEW.

then in that EJB method you call your code that needs a transaction.

I coded such a bean in my life so you can get the code here :

http://anoncvs.forge.jboss.com:8080/viewrep/~raw,r=1.3/JBoss/nukes/nukes/src/main/org/jboss/nukes/core/ejb/UtilsEJB.java

an example of usage is :


  | UtilsEJB utils = 
((UtilsEJBLocalHome)ctx.lookup(UtilsEJBLocalHome.JNDI_NAME)).create();
  | utils.requiresNew(new UtilsEJB.Executable()
  | {
  |System.out.println(this is running in its own transaction);
  | });
  | 


View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3897911#3897911

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3897911


---
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [JBoss Portal] - Re: Transaction problems with JBoss Portal + JBPM

2005-09-29 Thread [EMAIL PROTECTED]
Hi Sven,

A possible solution is in the jBPM forum : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3897942#3897942

Regards,
Koen

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3897943#3897943

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3897943


---
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [JBoss Portal] - Re: Transaction problems with JBoss Portal + JBPM

2005-09-28 Thread [EMAIL PROTECTED]
using the tx datasource, try to deploy the session factory with the following 
properties : 


  | hibernate.transaction.flush_before_completion=true
  | hibernate.transaction.auto_close_session=true
  | 
hibernate.transaction.factory_class=org.hibernate.transaction.JTATransactionFactory
  | 
hibernate.transaction.manager_lookup_classrg.hibernate.transaction.JBossTransactionManagerLookup
  | 

the goal is that the hibernate transaction wrapper should not commit the 
underlying JTA transaction and should flush its data when the JTA tx commits.


View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3897837#3897837

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3897837


---
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [JBoss Portal] - Re: Transaction problems with JBoss Portal + JBPM

2005-09-28 Thread sven.schulz
Thank you Julien. I've done what you said. No success. My hibernate portal 
configuration now looks like


  | ?xml version='1.0' encoding='utf-8'?
  | !DOCTYPE hibernate-configuration PUBLIC
  | -//Hibernate/Hibernate Configuration DTD//EN
  | http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd;
  | hibernate-configuration
  |session-factory
  |   name=java:portal/SessionFactory
  |   property name=connection.datasourcejava:PortalDS/property
  |   property name=show_sqlfalse/property
  |   property name=transaction.flush_before_completiontrue/property
  |   property name=transaction.auto_close_sessiontrue/property
  |   property 
name=transaction.factory_classorg.hibernate.transaction.JTATransactionFactory/property
  |   property 
name=transaction.manager_lookup_classorg.hibernate.transaction.JBossTransactionManagerLookup/property
  | 
  |   !-- Force the dialect instead of using autodetection --
  |   !--
  |   property 
name=dialectorg.hibernate.dialect.PostgreSQLDialect/property
  |   --
  | 
  |   !-- Mapping files --
  |   mapping resource=org/jboss/portal/core/impl/role/RoleImpl.hbm.xml/
  |   mapping resource=org/jboss/portal/core/impl/user/UserImpl.hbm.xml/
  |   mapping resource=org/jboss/portal/core/impl/user/UserPref.hbm.xml/
  |   mapping 
resource=org/jboss/portal/core/impl/user/UserPrefSet.hbm.xml/
  |/session-factory
  | /hibernate-configuration
  | 

Hope you have more ideas :-)

Regards,
Sven Schulz

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3897841#3897841

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3897841


---
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [JBoss Portal] - Re: Transaction problems with JBoss Portal + JBPM

2005-09-28 Thread sven.schulz
Wouldn't it be necessary to do this for the inner transaction (in jBpm). Since 
this one shouldn't commit but does (as requested in source code)?

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3897843#3897843

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3897843


---
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user