You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Armin Waibel <ar...@apache.org> on 2004/11/16 20:24:41 UTC

Re: Error with ConnectionManagerImpl...

Hi Fernando,

if you use OJB within a session bean, please set
PersistenceBrokerFactoryClass=org.apache.ojb.broker.core.PersistenceBrokerFactorySyncImpl
in OJB.properties file. In managed environment it's only allowed to use 
JTA-tx, so use container managed tx or UserTransation.
http://db.apache.org/ojb/docu/guides/deployment.html#%0A++++++++++++++++++++++++

regards,
Armin


Fernando Bernardino wrote:
> Hi everybody!
> I'm using OJB 1.0.1 with JBoss 3.2.5, and using OJB via JNDI. It seems to be working fine, but after I start a transaction:
> 
>  protected PersistenceBroker broker;
> 
>  public BaseDAO(){
>   try{
>    broker = PersistenceBrokerFactoryFactory.instance().defaultPersistenceBroker();
>   }catch(Exception e){
>    e.printStackTrace();
>   }
>  }
> .....
> broker.beginTransaction();
> broker.store(object);
> .....
> 
> the ERROR is printed in the JBoss console. I can store the object, but this error still happening.
> 
> 16:26:53,296 INFO  [STDOUT] [org.apache.ojb.broker.accesslayer.ConnectionManagerImpl] ERROR: 
> 16:26:53,296 INFO  [STDOUT] Release connection: connection is in local transaction, missing 'localCommit' or 'localRollback' call - try to rollback the connection
> 
> How can i fix this problem?
> 
> OJB.propeties:
> #----------------------------------------------------------------------------------------
> # PersistenceBrokerFactory / PersistenceBroker
> #----------------------------------------------------------------------------------------
> PersistenceBrokerFactoryClass=org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl
> 
> #----------------------------------------------------------------------------------------
> # ConnectionFactory / Default ConnectionPool
> #----------------------------------------------------------------------------------------
> ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFactoryManagedImpl
> 
> #----------------------------------------------------------------------------------------
> # ConnectionManager
> #----------------------------------------------------------------------------------------
> ConnectionManagerClass=org.apache.ojb.broker.accesslayer.ConnectionManagerImpl
> 
> #----------------------------------------------------------------------------------------
> # JdbcAccess
> #----------------------------------------------------------------------------------------
> JdbcAccessClass=org.apache.ojb.broker.accesslayer.JdbcAccessImpl
> 
> #----------------------------------------------------------------------------------------
> TATransactionManagerClass=org.apache.ojb.odmg.transaction.JBossTransactionManagerFactory
> 
> 
> Need to show something more?
> 
> Thanks for your help.
> ___________________________
> |  Fernando G. Bernardino
> |  .COM Tecnologia
> |  Desenvolvimento e Consultoria
> |  8802-0104 -- 224-1921
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org