dev@glassfish.java.net

Re: Problems with container persistence.xml processing andnon-jtaconnection pooling.

From: Andrei Ilitchev <andrei.ilitchev_at_oracle.com>
Date: Thu, 1 Feb 2007 11:10:59 -0500

Jagadish,

The server log is attached.

I started the server;
ran the test through the servlet:
  it executes select ...for update;
  executed without any visible problems (at least from servlet's point of
view);
ran the test for the second time:
  the test appears to be hanging (server.log: the sql was executed at
2007-02-01T10:54:56.785; the next statement at
2007-02-01T10:58:45.129-0500);
stopped the server.

Thanks,
Andrei

----- Original Message -----
From: "Jagadish Prasath Ramu" <Jagadish.Ramu_at_Sun.COM>
To: <dev_at_glassfish.dev.java.net>
Sent: Thursday, February 01, 2007 10:33 AM
Subject: Re: Problems with container persistence.xml processing
andnon-jtaconnection pooling.


> Hi Andrei,
> [Please see my comments in-line]
> On Thu, 2007-02-01 at 10:10 -0500, Andrei Ilitchev wrote:
>> Jagadish,
>>
>> 1. > What type of datasource ? javax.sql.XADS / ConnectionPoolDS / DS ?
>> I defined the data source using Admin Console using the following
>> settings:
>> Datasource Classname: oracle.jdbc.pool.OracleDataSource;
>> Resource Type: javax.sql.DataSource
>> properties: user, password, URL
>> default settings for everything else.
>>
>> 2. > Can you check the default autocommit value of the connection in
>> stand-alone (non-EE) mode ?
>> In a simple standalone test the connection obtained from
>> oracle.jdbc.pool.OracleDataSource has autoCommit set to true.
>>
>> 3. > If the datasource is not a XADataSource, can you please enable
>> logging
>> to FINE for "connector" module and see whether
>> > "ConnectorXAResource.end() called" is logged for a non-tx connection.
>> If you tell me how to do it and it's not too time consuming I can do it.
> In domain.xml, module-log-levels will have "connector" module, log level
> will be "INFO" by default. This need to be changed to "FINEST". Restart
> the domain.
>> Currently I only have entity-persistence and entity-persistence-tests
>> sources.
> If your test uses only non-jta datasource, test execution should not
> result in the log "ConnectorXAResource.end() called" .
>
> Thanks,
> -Jagadish
>> Also I have glassfish installation in publish folder created for running
>> appserver tests.
>>
>> Thanks,
>> Andrei
>> ----- Original Message -----
>> From: "Jagadish Prasath Ramu" <Jagadish.Ramu_at_Sun.COM>
>> To: <dev_at_glassfish.dev.java.net>; "Sanjeeb Kumar Sahoo"
>> <Sanjeeb.Sahoo_at_Sun.COM>
>> Sent: Thursday, February 01, 2007 1:14 AM
>> Subject: Re: Problems with container persistence.xml processing and
>> non-jtaconnection pooling.
>>
>>
>> > On Wed, 2007-01-31 at 22:35 +0530, Sanjeeb Kumar Sahoo wrote:
>> >> Andrei Ilitchev wrote:
>> >> > While fixing issue 2106 I ran upon the following problems in
>> >> > container:
>> >> > 1. Even though no non-jta data source was specified in
>> >> > persistence.xml
>> >> > a non-jta data source was created and passed to TopLink to be used
>> >> > for
>> >> > reading.
>> >> > That doesn't seem to be spec. complient.
>> >> Reading the following javadocs comment as specified in section #7.1.4
>> >> of
>> >> JPA spec, I think it is perfectly fine for a container to supply a
>> >> non-jta-data-source object even if user did not specify a value in
>> >> p.xml.
>> >> /**
>> >> * @return The non-JTA-enabled data source to be used by the
>> >> * persistence provider for accessing data outside a JTA
>> >> * transaction.
>> >> * The data source corresponds to the named <non-jta-data-source>
>> >> * element in the persistence.xml file or provided at
>> >> * deployment or by the container.
>> >> */
>> >> public DataSource getNonJtaDataSource();
>> >>
>> >> > 2. Non-jta connection pool produces connections with autoCommit set
>> >> > to
>> >> > false.
>> >> > 3. After connection obtained from non-jta data source is closed it
>> >> > still holds the locks.
>> >> Jagadish, can you comment on #2 & #3? FYI, we use
>> >> /ConnectorRuntime.getRuntime().lookupNonTxResource(DSName)/ to get
>> >> hold
>> >> of this data source.
>> >>From the tests I have, it works fine. JDBC-RA does not change the
>> > autocommit value of connections in non-tx mode.
>> >
>> > What type of datasource ? javax.sql.XADS / ConnectionPoolDS / DS ?
>> >
>> > Can you check the default autocommit value of the connection in
>> > stand-alone (non-EE) mode ?
>> >
>> > If the datasource is not a XADataSource, can you please enable logging
>> > to FINE for "connector" module and see whether
>> > "ConnectorXAResource.end() called" is logged for a non-tx connection.
>> >
>> > Thanks,
>> > -Jagadish
>> >
>> >>
>> >> Thanks,
>> >> Sahoo
>> >> >
>> >> > For more details please see
>> >> > https://glassfish.dev.java.net/issues/show_bug.cgi?id=2106
>> >> >
>> >> > Thanks,
>> >> >
>> >> > Andrei
>> >> > ---------------------------------------------------------------------
>> >> > To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> >> > For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>> >> >
>> >>
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> > For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>
>