Hi!
Aaron Mulder wrote:
>
> On Sat, 20 May 2000, Rickard [iso-8859-1] �berg wrote:
> > ...
> > Aaron, ask me if you have any more questions. And Marc: you should read
> > the JTA spec one more time ;-) (although I don't blame you; I just
> > understood these things myself)
> >
> > /Rickard
>
> Looks like *I* need to read the JTA spec!
YES! :-) It's healthy to do so though. ;-)
> I assume the XAResource
> has callbacks so when the bean calls commit or rollback the connection
> will be committed or rolled back?
Indeed.
> But the main question is: Proxies. Looking at the DataSourceImpl,
> I see that it doesn't actually return a connection, but instead a Proxy
> for a connection. The proxies seem to be dynamically constructed bytecode
> to wrap a specified class. That's pretty incredible (to me), but I'm not
> really sure what it gets you. If I just use the existing DataSourceImpl,
> I guess my connections would get wrapped in proxies too. If not, do I
> need to manually wrap every connection in a proxy before I return it?
> Why?
The proxies just another way of making a wrapper connection for the real
connections. The standard way of doing it is to create a class which has
dummy methods that simply forward invocations to the underlying
connection. By using proxies this can be generalized so that this
functionality is only done once.
/Rickard
--
Rickard �berg
@home: +46 13 177937
Email: [EMAIL PROTECTED]
http://www.telkel.com
http://www.jboss.org
http://www.dreambean.com