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...@code-au-lait.de> on 2003/09/03 11:22:30 UTC
Re: [BUG] ConnectionManagerImpl has no connection on commit (was before : Help with PlatformDefaultImpl - Given connection was null, cannot prepare autoCommit state)
Hi Roger,
think this is a side-effect of the jboss specific
eager-release 'true' setting. Do you use OJB
within jboss? If not, don't set eager-release 'true'.
It's on my todo-list to get rid of this attribute.
regards,
Armin
----- Original Message -----
From: "Janssen, Roger" <Ro...@ibanx.nl>
To: "'OJB Users List'" <oj...@db.apache.org>
Sent: Wednesday, September 03, 2003 11:00 AM
Subject: [BUG] ConnectionManagerImpl has no connection on commit (was
before : Help with PlatformDefaultImpl - Given connection was null,
cannot prepare autoCommit state)
> Hi (Armin and others),
>
> using the RC4, PB api and MySql, with the following settings in
> ojb.properties and database repository:
>
>
ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFacto
ryNo
> tPooledImpl
>
>
> <jdbc-connection-descriptor
> jcd-alias="default"
> default-connection="true"
> batch-mode="false"
> useAutoCommit="1"
> ignoreAutoCommitExceptions="false"
> eager-release="true"
> platform="MySQL"
> jdbc-level="2.0"
> driver="org.gjt.mm.mysql.Driver"
> protocol="jdbc"
> subprotocol="mysql"
> dbalias="//localhost:3306/metanumber"
> username="sa"
> password="kulikoma"
> >
> <connection-pool
> maxActive="21"
> validationQuery="SELECT * FROM IBANX_USER" />
>
> <sequence-manager
>
className="org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImp
l">
> <attribute attribute-name="grabSize"
attribute-value="50"/>
> <attribute attribute-name="autoNaming"
attribute-value="false"/>
> <attribute attribute-name="globalSequenceId"
> attribute-value="false"/>
> <attribute attribute-name="globalSequenceStart"
> attribute-value="10000"/>
> </sequence-manager>
>
> </jdbc-connection-descriptor>
>
>
> whenever i have code like this:
>
> broker.beginTransaction();
> broker.store(obj);
> broker.commitTransaction();
>
> on issueing the commit, the underlying ConnectionManagerImpl has no
> connection.
>
> tracing (with loads of added system.out statements in OJB code)
revealed
> that upon the call of broker.store(obj), the connection within the
> connectionmanager gets released and set to null, so when later calling
a
> commit, there is no connection to commit on, hence we also get the
error
> logged from PlatformDefaultImpl [ Given connection was null, cannot
prepare
> autoCommit state].
>
> hope this gives you the info so you can reproduce it.
>
> Roger Janssen
> iBanx
>
>
>
************************************************************************
*
> The information contained in this communication is confidential and is
> intended solely for the use of the individual or entity to whom it is
> addressed.You should not copy, disclose or distribute this
communication
> without the authority of iBanx bv. iBanx bv is neither liable for
> the proper and complete transmission of the information has been
maintained
> nor that the communication is free of viruses, interceptions or
interference.
>
> If you are not the intended recipient of this communication please
return
> the communication to the sender and delete and destroy all copies.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org