Subject Re: local transaction active can't begin another.
Author skullmaggots
Hi Roman,

Thanks for the reply.

Only one small part of my application actually needs XA support the
rest of it 99% only needs local transaction support. In light of this
is it better for me to just use FBWrappingDataSource directly and
forget about JCA for the bulk of the application?

The part which does need XA support works fine using the JBoss JCA
wrapper, so I have no great need at the moment for an XADataSource
implementation.

If I had some time I would gladly have a crack at this myself but
unfortunately I'm snowed under the moment. If things ease up I will
check back and see if I can help.

thanks,

Jeff.

--- In Firebird-Java@yahoogroups.com, "Roman Rokytskyy"
<rrokytskyy@a...> wrote:
> > The exception I posted first appears to be related to an early
> > NullPointerException. This early exception again is a mystery and
I
> > found one other post of this forum from someone with exactly the
> > same problem. Someone suggested using the local transactions
instead
> > of xa transactions, I would like to understand the reason for
this
> > if anybody knows.
>
> Reason is not local vs xa transactions, but whether you access
server
> using JCA framework or JDBC driver. Currently we do not have
> XADataSource implementation, but I think I will manage to implement
it
> before release.
>
> > The exception is shown below and appears to be a problem starting
a
> > new transaction is class GDS_Impl.
> >
> > I going to switch over to using a local jca-jdbc config instead
of
> > xa jca-jdbc config but feel I making changes blind :-(
> >
> > Again to re-iterate 99.9% of the transactions work, e.g. 30,000
will
> > work and one or two will throw the following exception.
>
> NPE happens in the following line:
>
> db.out.writeInt(op_transaction);
>
> This means that either "db" is null or "out" is null. "db" can be
null
> due to some bug? in JCA code (either driver, since it passed null
> value or, JBoss, which caused driver to pass null value), "out" can
be
> null if connection was closed. This is not the first time I see this
> bug when using JCA framework, but till now I did not see it when
> accessing database via JCA.
>
> If you are willing to invest some time into the project, you can
> create XADataSource implementation using org.firebirdsql.pool.*
> classes. Note that connection already implements XAResource
interface,
> so implementing XADataSource is a matter of probably one day max.
For
> me this would mean more, since I would need to set up test
environment
> (I do not use any app.server at home). If you have such env., then
it
> should be easy to test correctness of the implementation.
>
> Best regards,
> Roman Rokytskyy