Hi Armin,

I am very sorry to come back to the same topic after such a long time, but we are super bussy to get our thing up and running.

we are using the Persistent Broker API in an managed enviroment as jboss or OC4J (oracle application server). using the ojb.org.apache.ojb.broker.accesslayer.ConnectionFactoryManagedImpl from
OJB with jboss I see the following log:


-------------------------------------------------------------------------------

[ejb.ojb.org.apache.ojb.broker.accesslayer.ConnectionManagerImpl] (Thread-10) Rollback was called, do rollback on current connection [EMAIL PROTECTED]

[ejb.ojb.org.apache.ojb.broker.accesslayer.ConnectionManagerImpl] (Thread-10) Rollback on the underlying connection failed
java.sql.SQLException: You cannot rollback during a managed transaction!
at org.jboss.resource.adapter.jdbc.local.LocalManagedConnection.jdbcRollback(LocalManagedConnection.java:478)
at org.jboss.resource.adapter.jdbc.local.LocalConnection.rollback(LocalConnection.java:457)
at org.apache.ojb.broker.util.WrappedConnection.rollback(Unknown Source)
at org.apache.ojb.broker.util.pooling.ByPassConnection.rollback(Unknown Source)
at org.apache.ojb.broker.accesslayer.ConnectionManagerImpl.localRollback(Unknown Source)
at org.apache.ojb.broker.core.PersistenceBrokerImpl.abortTransaction(Unknown Source)
at org.apache.ojb.broker.core.DelegatingPersistenceBroker.abortTransaction(Unknown Source)


-------------------------------------------------------------------------------

if I use an implentation which produces connections with a NOOP-rollback method, than I see only:

-------------------------------------------------------------------------------

[ejb.ojb.org.apache.ojb.broker.accesslayer.ConnectionManagerImpl] (Thread-11) Rollback was called, do rollback on current connection [EMAIL PROTECTED]
14:00:20,312 INFO [STDOUT] ** we ignore rollback


-------------------------------------------------------------------------------

when I understand the JDO spec correct, than the transaction borders is done by the embedding enviroment only.

so altogether our own implementation works fine on jboss and on OC4J with our connection factory.

FYI: OJB really helped us a lot to have an application which deploys easiely on serveral application servers !!

hope you find the time for checking it.

best wishes Kristian



Armin Waibel wrote:
> Hi Kristian,
>
> sorry for the late reply.
> In next future I didn't find the time to check
> your proposal to make rollback() a noop in
> ConnectionFactoryManaged Impl, but sounds
> correct. In a managed environment there is no
> need (think it's not allowed) to rollback
> connection.
> What's your experience with the changed Factory?
> Which API do you use (odmg, pb)?
>
> regards,
> Armin
>
> ----- Original Message -----
> From: "kristian meier" <[EMAIL PROTECTED]>
> To: "OJB Users List" <[EMAIL PROTECTED]>
> Sent: Friday, September 12, 2003 5:04 PM
> Subject: ConnectionFactoryManagedImpl and rollbacks
>
>
>
>>Hello,
>>
>>we are using OJB on an application server, in the moment JBoss.
>>everything works fine until
>>there comes an exception and the PersistentBroker gets closed without
>
> a
>
>>commit.
>>
>>in the  close()-method the broker does a rollback on the underlying
>>connection-object and with
>>the ByPassConnection the rollback is then triggered on the underlying
>>connection-object.
>>
>>now my exception is caught by the EJB-container and again a rollback
>
> is
>
>>triggered on the current transaction,
>>which generates another exception from the EJB-container.
>>
>>we have seen this behaviour also on WebSphere and on
>>SunONE-Applicationserver.
>>
>>things seemed to be better after we used our own
>>ConnectionFactoryManagedImpl  where the rollback()-method
>>is also no-op.
>>
>>do I miss something, why the rollback()-method is needed as is in an
>>applcation-server-scenario ?
>>
>>some hints are welcome to understand better what is going on here,
>
> thank you
>
>>Kristian
>>

--
----------------------------------------------------------------------
 Jentro Technologies GmbH
 Kristian Meier, Developer
----------------------------------------------------------------------
 Rosenheimer Str. 145e     81671 Munich, Germany
 Tel. +49 89 189 169 80    mailto: [EMAIL PROTECTED]
 Fax. +49 89 189 169 99    internet: http://www.jentro.com
----------------------------------------------------------------------


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



Reply via email to