It appears as though beginTransaction() is called on
the given PersistenceBroker instance when it is
created.  Then, when a JTA commit operation occurs, it
tries to release the connection (as shown in the stack
trace below) but thinks that a local transaction is
active.

I assume that with a JTA transaction, no local
transaction should be involved.  I see there were
changes in this (these messages appear new).  

Is anyone else seeing this behavior?

Gary

--- Gary <[EMAIL PROTECTED]> wrote:
> No, I first commit or rollback the transaction, and
> then close the PB.
> 
> Gary
> 
> --- Armin Waibel <[EMAIL PROTECTED]> wrote:
> > Gary wrote:
> > 
> > > Armin:
> > > 
> > > Thanks for the quick reply.  Do you guys have a
> > > "contribute" site like SourceForge so I could
> buy
> > you
> > > a beer?
> > >
> > 
> > Think I should avoid to drink alcohol, because
> your
> > problem seems really 
> > sophisticated ;-)
> > 
> > 
> > > No, I wasn't using the "Sync" factory.  When I
> > change
> > > to it, I get a new error:
> > > 2004-06-15 15:19:29,798 ERROR [TCP
> > > Connection(7)-172.24.54.129] Connection is in
> > local
> > > transaction, do a 'localCommit' or
> 'localRollback'
> > > beforeperform the connection release - rollback
> > the
> > > connection now
> > >
> >
>
(org.apache.ojb.broker.accesslayer.ConnectionManagerImpl.releaseConnection(ConnectionManagerImpl.java))
> > > 
> > 
> > hmm, do you close the PB instance within the used
> > method or before the 
> > tx demarcation ends?
> > I assume you don't.
> > 
> > regards,
> > Armin
> > 
> > 
> > > 
> > > 
> > > It has the following stack trace:
> > > System Thread [TCP Connection(7)-172.24.54.129]
> > > (Suspended)
> > >   ConnectionManagerImpl.releaseConnection() line:
> > 295
> > > 
> > >
> >
>
PersistenceBrokerFactorySyncImpl$PersistenceBrokerSyncImpl.beforeCompletion()
> > > line: 240
> > > 
> > >
> >
>
PersistenceBrokerFactorySyncImpl$TransactionBox.beforeCompletion()
> > > line: 418
> > >   RegisteredSyncs.distributeBefore() line: 110
> > >   TransactionImpl.internalPrepare() line: 1211
> > >   TransactionImpl.commit() line: 960
> > >   TranManagerImpl.commit() line: 150
> > >   TranManagerSet.commit() line: 182
> > > 
> > > My OJB.properties is as follows:
> > > #<!--
> > > #/* Copyright 2002-2004 The Apache Software
> > Foundation
> > > # *
> > > # * Licensed under the Apache License, Version
> 2.0
> > > (the "License");
> > > # * you may not use this file except in
> compliance
> > > with the License.
> > > # * You may obtain a copy of the License at
> > > # *
> > > # *    
> http://www.apache.org/licenses/LICENSE-2.0
> > > # *
> > > # * Unless required by applicable law or agreed
> to
> > in
> > > writing, software
> > > # * distributed under the License is distributed
> > on an
> > > "AS IS" BASIS,
> > > # * WITHOUT WARRANTIES OR CONDITIONS OF ANY
> KIND,
> > > either express or implied.
> > > # * See the License for the specific language
> > > governing permissions and
> > > # * limitations under the License.
> > > # */
> > > #-->
> > > # OJB.properties -- configuration of the OJB
> > runtime
> > > environment
> > > # Version: 1.0
> > > # (c) 2001, 2002, 2003 Apache Software
> Foundation
> > > # Author: Thomas Mahler and many others
> > > # @version $Id: OJB.properties,v 1.70 2004/06/03
> > > 23:46:08 arminw Exp $
> > > #
> > >
> >
>
#----------------------------------------------------------------------------------------
> > > # repository file settings
> > >
> >
>
#----------------------------------------------------------------------------------------
> > > # The repositoryFile entry tells OJB to use this
> > file
> > > as as its standard mapping
> > > # repository. The file is looked up from the
> > > classpath.
> > > #
> > > repositoryFile=repository.xml
> > > #
> > > # If the useSerializedRepository entry is set to
> > true,
> > > OJB tries to load a
> > > # serialized version of the repository for
> > performance
> > > reasons.
> > > # if set to false, OJB always loads the xml
> file.
> > > # Setting this flag to true will accelerate the
> > > startup sequence of OJB.
> > > # If set to true changes to the repository.xml
> > file
> > > will only be detected
> > > # after maually deleting the
> > repository.xml.serialized
> > > file.
> > > useSerializedRepository=false
> > > #
> > > # If Repository serialization is used the entry
> > > serializedRepositoryPath defines the
> > > # directory where the Repository is written to
> and
> > > read from.
> > > # this entry is used only when the
> > > useSerializedRepository flag is set to true
> > > #
> > > serializedRepositoryPath=.
> > > #
> > >
> >
>
#----------------------------------------------------------------------------------------
> > > # PersistenceBrokerFactory / PersistenceBroker
> > >
> >
>
#----------------------------------------------------------------------------------------
> > > # The PersistenceBrokerFactoryClass entry
> decides
> > > which concrete
> > > # PersistenceBrokerFactory implemention is to be
> > used.
> > >
> >
>
#PersistenceBrokerFactoryClass=org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl
> > > # If in managed environment *only* the PB-api
> was
> > used
> > > it's recommended to use this factory
> > > # to enable the PersistenceBroker instances to
> > > participate in the JTA transaction. This makes
> > > # e.g. PBStateListener work properly in managed
> > > environments.
> > >
> >
>
PersistenceBrokerFactoryClass=org.apache.ojb.broker.core.PersistenceBrokerFactorySyncImpl
> > > #
> > > #
> > > # The PersistenceBrokerClass entry decides which
> > > concrete PersistenceBroker
> > > # implementation is to be served by the
> > > PersistenceBrokerFactory.
> > > # This is the singlevm implementation:
> > >
> >
>
PersistenceBrokerClass=edu.mayo.evolution.infrastructure.ojb.EvolutionPersistenceBrokerImpl
> > >
> >
>
#PersistenceBrokerClass=org.apache.ojb.broker.core.PersistenceBrokerImpl
> > > #
> > > # This is an implementation that uses Prevayler
> > > (prevayler.sf.net) as the persistent storage.
> > > # Using this implementation OJB works as a
> simple
> > > OODBMS
> > >
> 
=== message truncated ===



                
__________________________________
Do you Yahoo!?
Take Yahoo! Mail with you! Get it on your mobile phone.
http://mobile.yahoo.com/maildemo 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to