Nick Stuart wrote:
I haven't had a lot of experince with either spring or hibernate, but
I do know something will have to be added to Castor in order for this
to work. Be it a wrapper or a utility class of some kind.

How I see it is, in the container you start the transaction and pass
to the object that you want to use the object. And then once that
object is done, you're container will commit the transaction and
handle any of the errors. First step I think would be to handle this
straight through with a Database object, and your underlying objects
would have to take/use/get the Database object that is created in the
IoC container.

-Nick


On Thu, 18 Nov 2004 14:39:32 -0000, Marco Mistroni <[EMAIL PROTECTED]> wrote:

Hello,
       I have quickly checked sources of spring to see how IoC is  done
with Hibernate, and I thought that maybe trick is passing Spring
Transaction to
Castor JDO object ... but had just a quick look, and since I know castor
only from user point of view...i am not sure if that is the way to go...
And as well something like 'hibernatedaosupport' could be created for
castor, that wraps Castor's JDO....



Regards
       marco

-----Original Message-----
From: Marco Mistroni [mailto:[EMAIL PROTECTED]
Sent: 18 November 2004 14:29
To: [EMAIL PROTECTED]
Subject: Re: [castor-user] Integrating with an IOC container.

Hello,
       I have thought...... but just thought.... because
I am already using Spring at home with hibernate, and since I want
To switch my persistence layer, I have sent a mail almost 1 month ago
About how to do it....
Got some replies by castor committers to continue discussion on dev
list, and that some of castor committers has at some point integrated
castor with
Spring, though I am not aware of details..
But After that I got  an huge workload that brought me away from that
Idea...

I would be interested however in participating on that issue however...

Regards
       marco

-----Original Message-----
From: Nick Stuart [mailto:[EMAIL PROTECTED]
Sent: 18 November 2004 14:12
To: [EMAIL PROTECTED]
Subject: [castor-user] Integrating with an IOC container.

Hello all, I was wondering if anyone out there has thought about, or
done something with, integrating Castor with an IoC container like
HiveMind or Spring. I know there is a big Spring + Hibernate movement
out there, and was wondering what the possibilies where for doing
something similar with Castor, mainly the JDO part, but there may be
room for doing stuff with XML as well.

There is a lot of boiler plate code that goes into a lot of functions
when deal with castor. Such as jdo.getDatabase, db.begin, db.commit,
etc etc. To me it looks like this could be wrapped up, but I don't
have a lot of experince with IoC's yet and have only used HiveMind
(which I like quite a bit).

I think having a layer like this would be pretty cool and actually
pretty helpful as well. I think another option would be using AspectJ,
but thats to non-javaish for me at the moment and a little to Black
Magicish. Maybe when it matures a little bit and gets more tool
support besides just Eclipse it would be something I would look into.

Any input? Ideas?

Nick,

I've got a lot of experience with Spring and had only just begun to look into integrating Castor with it. I'd love to provide such integration and write all about it in the Castor Live book eventually. But first I need to finish the last three chapters. Let me do that and then I'll have the time to look into Spring integration.

Bruce
--
perl -e 'print unpack("u30","<0G)[EMAIL PROTECTED]&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");'


The Castor Project
http://www.castor.org/

Apache Geronimo
http://geronimo.apache.org/



----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user

Reply via email to