The connection type returned to me is
org.opentools.minerva.jdbc.xa.wrapper.XAClientConnection
I checked through the code for this and it appears to throw an exception
if the connection is in a transaction. (didn't actually verify the code, just
merely read it).
If I do not specify a resource manager or a resource, does it mean that I can still
lookup and use the connection,
but the transaction handling needs to be Bean-managed instead? If that's the case,
shouldn't the Container throw
an exception and say that I can't use the requested connection within a container
managed Bean?
hs
"danch (Dan Christopherson)" wrote:
> Hoong-Shen Wong wrote:
>
> > I do a lookup for it using java:/defaultSourceName. I tried the call and it
> > works so far as I can execute the SQL (i.e.
> > if the table doesn't exist, it throws an exception), but it doesn't get
> > written to the database. And when I checked for
> > a transaction. It appears that JBoss thinks I'm not in a transaction (did a
> > test by using setAutoCommit and it was happy
> > to let me set the autocommit).
>
> It won't complain about that ever - being able to set autocommit doesn't
> mean you're not in a transaction.
>
> I'll have to look at how the connections are enlisted in the transaction
> later. In the mean time, try adding a resource-ref section to your
> bean's descriptor - if you're using DefaultDS, it'll get mapped
> automatically, if not, you'll have to add a resource-ref _and_ a
> resource-manager to jboss.xml in your ejb-jar. Take a look at jboss.dtd
> or in the list archives (through www.jboss.org) for more details on this.
>
> >
> > By the way, the call to the JDBC connection is many layers down from the EJB,
> > i.e.
> > --> i.e. SequenceBean calls databaseutility calls getConnection and executes
> > the update.
> > don't think it would hurt though.
>
> That should be fine.
>
> > The deployment descriptor was actually imported from IPlanet6 and it worked
> > fine there.
> >
>
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user