Armin:

Thanks again for your help.

Do you mean that I should close the PB before the
commit is called?  If so, I tried it, with the same
results.

I am still confused as to what the correct ordering of
PB opens/closes and commit/rollback operations are.

This all worked great before I moved to RC7.  I can't
remember if I was on RC5 or RC6 before...

Gary

--- Armin Waibel <[EMAIL PROTECTED]> wrote:
> Hi Gary,
> 
> Gary wrote:
> 
> > No, I first commit or rollback the transaction,
> and
> > then close the PB.
> > 
> 
> ok, so I think this is the reason for the failure.
> In managed 
> environments the PB instance has the same behavior
> as a DataSource in 
> managed environments. Means that you operate with an
> PB handle instance 
> (wraps the real PB instance) and after use you have
> to close the handle 
> instance. If you use an connection from a DataSource
> in an managed 
> environment you have to close the connection before
> the tx was completed 
> too (I think so).
> 
> Maybe it will be better only to log an warning
> instead of throwing an 
> exception in this case.
> 
> regards,
> Armin
> 
> > 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
> 
=== 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