You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hivemind.apache.org by Aleksej <al...@ivs.lt> on 2006/07/05 14:58:01 UTC

Transaction demarcation for JDBC connection and Hibernate.

Hi, list!
We currently have a project where both JDBC and Hibernate based services 
exists.
Some of those services are auto wired and uses code from each other in 
one transaction.
I am searching for transaction demarcation solution which cut be used in 
such environment.
Currently I know only one available solution for Hivemind ( I don't want 
to use Spring ).
It is Hivetranse, but I am not sure will it fit into our requirements. 
As I remember,
James Carman have something similar. That maybe sounds naive, but I want 
just
to put some jars into project, add interceptor to service implementation 
definition and to have
it working :) . Another one thing that scaring me is that Hibernate has 
it own way to work
with transactions, so I wonder how it will react on such interceptor. 
Maybe it is not possible at all?



Re: Transaction demarcation for JDBC connection and Hibernate.

Posted by Andrea Chiumenti <ki...@gmail.com>.
+1

On 7/5/06, James Carman <ja...@carmanconsulting.com> wrote:
>
> I think you could get away with using the same JDBC connection as the
> Hibernate Session object.  I've never tried it because I don't like
> writing JDBC code (sometimes you just have to or it's legacy code though,
> I understand).  There's a Session.connection() method.  You might even be
> able to perform some HiveMind magic with the ServicePropertyFactory
> (unfortunately, they didn't follow the JavaBeans spec when defining their
> accessor method, though) to make your JDBC-based services use the same
> connection.
>
> > Hi, list!
> > We currently have a project where both JDBC and Hibernate based services
> > exists.
> > Some of those services are auto wired and uses code from each other in
> > one transaction.
> > I am searching for transaction demarcation solution which cut be used in
> > such environment.
> > Currently I know only one available solution for Hivemind ( I don't want
> > to use Spring ).
> > It is Hivetranse, but I am not sure will it fit into our requirements.
> > As I remember,
> > James Carman have something similar. That maybe sounds naive, but I want
> > just
> > to put some jars into project, add interceptor to service implementation
> > definition and to have
> > it working :) . Another one thing that scaring me is that Hibernate has
> > it own way to work
> > with transactions, so I wonder how it will react on such interceptor.
> > Maybe it is not possible at all?
> >
> >
>
>
> James Carman, President
> Carman Consulting, Inc.
>
>

Re: Transaction demarcation for JDBC connection and Hibernate.

Posted by James Carman <ja...@carmanconsulting.com>.
I think you could get away with using the same JDBC connection as the
Hibernate Session object.  I've never tried it because I don't like
writing JDBC code (sometimes you just have to or it's legacy code though,
I understand).  There's a Session.connection() method.  You might even be
able to perform some HiveMind magic with the ServicePropertyFactory
(unfortunately, they didn't follow the JavaBeans spec when defining their
accessor method, though) to make your JDBC-based services use the same
connection.

> Hi, list!
> We currently have a project where both JDBC and Hibernate based services
> exists.
> Some of those services are auto wired and uses code from each other in
> one transaction.
> I am searching for transaction demarcation solution which cut be used in
> such environment.
> Currently I know only one available solution for Hivemind ( I don't want
> to use Spring ).
> It is Hivetranse, but I am not sure will it fit into our requirements.
> As I remember,
> James Carman have something similar. That maybe sounds naive, but I want
> just
> to put some jars into project, add interceptor to service implementation
> definition and to have
> it working :) . Another one thing that scaring me is that Hibernate has
> it own way to work
> with transactions, so I wonder how it will react on such interceptor.
> Maybe it is not possible at all?
>
>


James Carman, President
Carman Consulting, Inc.