[jira] Commented: (OPENJPA-144) JDBCConfigurationImpl does not support JNDI lookup for non-jta-data-source.

2007-02-16 Thread Patrick Linskey (JIRA)

[ 
https://issues.apache.org/jira/browse/OPENJPA-144?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12473743
 ] 

Patrick Linskey commented on OPENJPA-144:
-

I'm guessing that Approach 2 works with just a single jta-data-source listed, 
right?

Also, your description implies that with the most recent code, OpenJPA is 
looking up the non-jta-data-source, but WAS is still returning a data source 
with limitations. Is that correct? Based on this assumption, I will close this 
issue and create a new one re: our defaults and corresponding WAS limitations.

 JDBCConfigurationImpl does not support JNDI lookup for non-jta-data-source.  
 -

 Key: OPENJPA-144
 URL: https://issues.apache.org/jira/browse/OPENJPA-144
 Project: OpenJPA
  Issue Type: Bug
  Components: jdbc
 Environment: WebSphere 6.1, DB2 v8.1 and sequences
Reporter: Brad L Vandermoon
 Attachments: Both-JTAandNonJTASpecified.txt, Only-JTASpecified.txt, 
 openjpa-144-patch-2.jar, OPENJPA-144-patch.diff, openjpa-144-patch.jar, 
 PostPatch-144.txt, PostPatch-144fix2.txt


 A non-jta-data-source is required for DB2 sequences; however, 
 org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl does not support a JNDI 
 lookup for this data source from the openjpa.ConnectionFactory2Name property 
 as documented (refer to section 5.12 and 4.2.1 of the OpenJPA manual).
 It seems like the same implementation for the jta-data-source should be 
 implemented for the non-jta-data-source.  i.e.
 // ADD createConnectionFactory2()
 private DecoratingDataSource createConnectionFactory2() {
 DataSource ds = (DataSource) connectionFactory2.get();
 if (ds != null)
 return setupConnectionFactory(ds, true);
 ds = (DataSource) super.getConnectionFactory2(); // JNDI lookup
 if (ds == null)
 ds = DataSourceFactory.newDataSource(this, true);
 return setupConnectionFactory(ds, true);
 }
 // MODIFY this method 
 public Object getConnectionFactory2() {
 // override to configure data source
 if (dataSource2 == null) {
 DecoratingDataSource ds = createConnectionFactory2();
 dataSource2 = DataSourceFactory.installDBDictionary
 (getDBDictionaryInstance(), ds, this, true);
 }
 return dataSource2;
 }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (OPENJPA-144) JDBCConfigurationImpl does not support JNDI lookup for non-jta-data-source.

2007-02-15 Thread Patrick Linskey (JIRA)

[ 
https://issues.apache.org/jira/browse/OPENJPA-144?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12473514
 ] 

Patrick Linskey commented on OPENJPA-144:
-

Oops, I made a mistake in the createConnectionFactory() logic. This one looks 
better.

 JDBCConfigurationImpl does not support JNDI lookup for non-jta-data-source.  
 -

 Key: OPENJPA-144
 URL: https://issues.apache.org/jira/browse/OPENJPA-144
 Project: OpenJPA
  Issue Type: Bug
  Components: jdbc
 Environment: WebSphere 6.1, DB2 v8.1 and sequences
Reporter: Brad L Vandermoon
 Attachments: Both-JTAandNonJTASpecified.txt, Only-JTASpecified.txt, 
 openjpa-144-patch-2.jar, OPENJPA-144-patch.diff, openjpa-144-patch.jar, 
 PostPatch-144.txt


 A non-jta-data-source is required for DB2 sequences; however, 
 org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl does not support a JNDI 
 lookup for this data source from the openjpa.ConnectionFactory2Name property 
 as documented (refer to section 5.12 and 4.2.1 of the OpenJPA manual).
 It seems like the same implementation for the jta-data-source should be 
 implemented for the non-jta-data-source.  i.e.
 // ADD createConnectionFactory2()
 private DecoratingDataSource createConnectionFactory2() {
 DataSource ds = (DataSource) connectionFactory2.get();
 if (ds != null)
 return setupConnectionFactory(ds, true);
 ds = (DataSource) super.getConnectionFactory2(); // JNDI lookup
 if (ds == null)
 ds = DataSourceFactory.newDataSource(this, true);
 return setupConnectionFactory(ds, true);
 }
 // MODIFY this method 
 public Object getConnectionFactory2() {
 // override to configure data source
 if (dataSource2 == null) {
 DecoratingDataSource ds = createConnectionFactory2();
 dataSource2 = DataSourceFactory.installDBDictionary
 (getDBDictionaryInstance(), ds, this, true);
 }
 return dataSource2;
 }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (OPENJPA-144) JDBCConfigurationImpl does not support JNDI lookup for non-jta-data-source.

2007-02-15 Thread Brad L Vandermoon (JIRA)

[ 
https://issues.apache.org/jira/browse/OPENJPA-144?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12473548
 ] 

Brad L Vandermoon commented on OPENJPA-144:
---

I am getting a different error this time, but before I pass on the stack trace 
information, perhaps you can tell me what properties you'd expect to see set 
i.e. non-jta-data-source, openjpa.Connection2DriverName, 
openjpa.ConnectionFactory2Name, etc.

 JDBCConfigurationImpl does not support JNDI lookup for non-jta-data-source.  
 -

 Key: OPENJPA-144
 URL: https://issues.apache.org/jira/browse/OPENJPA-144
 Project: OpenJPA
  Issue Type: Bug
  Components: jdbc
 Environment: WebSphere 6.1, DB2 v8.1 and sequences
Reporter: Brad L Vandermoon
 Attachments: Both-JTAandNonJTASpecified.txt, Only-JTASpecified.txt, 
 openjpa-144-patch-2.jar, OPENJPA-144-patch.diff, openjpa-144-patch.jar, 
 PostPatch-144.txt


 A non-jta-data-source is required for DB2 sequences; however, 
 org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl does not support a JNDI 
 lookup for this data source from the openjpa.ConnectionFactory2Name property 
 as documented (refer to section 5.12 and 4.2.1 of the OpenJPA manual).
 It seems like the same implementation for the jta-data-source should be 
 implemented for the non-jta-data-source.  i.e.
 // ADD createConnectionFactory2()
 private DecoratingDataSource createConnectionFactory2() {
 DataSource ds = (DataSource) connectionFactory2.get();
 if (ds != null)
 return setupConnectionFactory(ds, true);
 ds = (DataSource) super.getConnectionFactory2(); // JNDI lookup
 if (ds == null)
 ds = DataSourceFactory.newDataSource(this, true);
 return setupConnectionFactory(ds, true);
 }
 // MODIFY this method 
 public Object getConnectionFactory2() {
 // override to configure data source
 if (dataSource2 == null) {
 DecoratingDataSource ds = createConnectionFactory2();
 dataSource2 = DataSourceFactory.installDBDictionary
 (getDBDictionaryInstance(), ds, this, true);
 }
 return dataSource2;
 }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (OPENJPA-144) JDBCConfigurationImpl does not support JNDI lookup for non-jta-data-source.

2007-02-15 Thread Patrick Linskey (JIRA)

[ 
https://issues.apache.org/jira/browse/OPENJPA-144?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12473554
 ] 

Patrick Linskey commented on OPENJPA-144:
-

For openjpa-144-patch-2.jar, I would expect you to need to set jta-data-source 
and non-jta-data-source appropriately. The second patch should correctly pick 
up the non-jta-data-source and use it for sequence purposes.

 JDBCConfigurationImpl does not support JNDI lookup for non-jta-data-source.  
 -

 Key: OPENJPA-144
 URL: https://issues.apache.org/jira/browse/OPENJPA-144
 Project: OpenJPA
  Issue Type: Bug
  Components: jdbc
 Environment: WebSphere 6.1, DB2 v8.1 and sequences
Reporter: Brad L Vandermoon
 Attachments: Both-JTAandNonJTASpecified.txt, Only-JTASpecified.txt, 
 openjpa-144-patch-2.jar, OPENJPA-144-patch.diff, openjpa-144-patch.jar, 
 PostPatch-144.txt


 A non-jta-data-source is required for DB2 sequences; however, 
 org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl does not support a JNDI 
 lookup for this data source from the openjpa.ConnectionFactory2Name property 
 as documented (refer to section 5.12 and 4.2.1 of the OpenJPA manual).
 It seems like the same implementation for the jta-data-source should be 
 implemented for the non-jta-data-source.  i.e.
 // ADD createConnectionFactory2()
 private DecoratingDataSource createConnectionFactory2() {
 DataSource ds = (DataSource) connectionFactory2.get();
 if (ds != null)
 return setupConnectionFactory(ds, true);
 ds = (DataSource) super.getConnectionFactory2(); // JNDI lookup
 if (ds == null)
 ds = DataSourceFactory.newDataSource(this, true);
 return setupConnectionFactory(ds, true);
 }
 // MODIFY this method 
 public Object getConnectionFactory2() {
 // override to configure data source
 if (dataSource2 == null) {
 DecoratingDataSource ds = createConnectionFactory2();
 dataSource2 = DataSourceFactory.installDBDictionary
 (getDBDictionaryInstance(), ds, this, true);
 }
 return dataSource2;
 }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (OPENJPA-144) JDBCConfigurationImpl does not support JNDI lookup for non-jta-data-source.

2007-02-14 Thread Brad L Vandermoon (JIRA)

[ 
https://issues.apache.org/jira/browse/OPENJPA-144?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12473085
 ] 

Brad L Vandermoon commented on OPENJPA-144:
---

When we specify only a jta-data-source, we get:  
4|false|0.9.7-incubating-SNAPSHOT 
org.apache.openjpa.util.InvalidStateException: Unable to execute suspend on a 
WebSphere managed transaction. WebSphere does not support direct manipulation 
of managed transactions.

When we try to use JNDI to specify the non-jta-data-source, we get the same 
error.  JDBCConfigurationImpl doesn't appear to use this information to 
populate datasource2.

When we pass the properties to have OpenJPA create the connection it works 
fine.  Here's the properties we pass: 

   entry key=openjpa.Connection2DriverName 
value=com.ibm.db2.jcc.DB2Driver/
entry key=openjpa.Connection2UserName value=Test/
entry key=openjpa.Connection2Password value=password/
entry key=openjpa.Connection2URL 
value=jdbc:db2://localhost:3700/RQSTSET/ 
entry key=openjpa.jdbc.Schema value=PROPCAS/

In this later case, JDBCConfigurationImpl creates a SimpleDriverDataSource for 
the datasource2 and uses it to do the sequence.


 JDBCConfigurationImpl does not support JNDI lookup for non-jta-data-source.  
 -

 Key: OPENJPA-144
 URL: https://issues.apache.org/jira/browse/OPENJPA-144
 Project: OpenJPA
  Issue Type: Bug
  Components: jdbc
 Environment: WebSphere 6.1, DB2 v8.1 and sequences
Reporter: Brad L Vandermoon

 A non-jta-data-source is required for DB2 sequences; however, 
 org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl does not support a JNDI 
 lookup for this data source from the openjpa.ConnectionFactory2Name property 
 as documented (refer to section 5.12 and 4.2.1 of the OpenJPA manual).
 It seems like the same implementation for the jta-data-source should be 
 implemented for the non-jta-data-source.  i.e.
 // ADD createConnectionFactory2()
 private DecoratingDataSource createConnectionFactory2() {
 DataSource ds = (DataSource) connectionFactory2.get();
 if (ds != null)
 return setupConnectionFactory(ds, true);
 ds = (DataSource) super.getConnectionFactory2(); // JNDI lookup
 if (ds == null)
 ds = DataSourceFactory.newDataSource(this, true);
 return setupConnectionFactory(ds, true);
 }
 // MODIFY this method 
 public Object getConnectionFactory2() {
 // override to configure data source
 if (dataSource2 == null) {
 DecoratingDataSource ds = createConnectionFactory2();
 dataSource2 = DataSourceFactory.installDBDictionary
 (getDBDictionaryInstance(), ds, this, true);
 }
 return dataSource2;
 }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (OPENJPA-144) JDBCConfigurationImpl does not support JNDI lookup for non-jta-data-source.

2007-02-14 Thread Patrick Linskey (JIRA)

[ 
https://issues.apache.org/jira/browse/OPENJPA-144?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12473208
 ] 

Patrick Linskey commented on OPENJPA-144:
-

It looks like there are two issues here. First, we seem to be incorrectly 
attempting to suspend the transaction when a non-jta data source is specified. 
Second, our WAS integration does not allow suspending of the JTA transaction. I 
will create a new issue for this second problem.

 JDBCConfigurationImpl does not support JNDI lookup for non-jta-data-source.  
 -

 Key: OPENJPA-144
 URL: https://issues.apache.org/jira/browse/OPENJPA-144
 Project: OpenJPA
  Issue Type: Bug
  Components: jdbc
 Environment: WebSphere 6.1, DB2 v8.1 and sequences
Reporter: Brad L Vandermoon
 Attachments: Both-JTAandNonJTASpecified.txt, Only-JTASpecified.txt


 A non-jta-data-source is required for DB2 sequences; however, 
 org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl does not support a JNDI 
 lookup for this data source from the openjpa.ConnectionFactory2Name property 
 as documented (refer to section 5.12 and 4.2.1 of the OpenJPA manual).
 It seems like the same implementation for the jta-data-source should be 
 implemented for the non-jta-data-source.  i.e.
 // ADD createConnectionFactory2()
 private DecoratingDataSource createConnectionFactory2() {
 DataSource ds = (DataSource) connectionFactory2.get();
 if (ds != null)
 return setupConnectionFactory(ds, true);
 ds = (DataSource) super.getConnectionFactory2(); // JNDI lookup
 if (ds == null)
 ds = DataSourceFactory.newDataSource(this, true);
 return setupConnectionFactory(ds, true);
 }
 // MODIFY this method 
 public Object getConnectionFactory2() {
 // override to configure data source
 if (dataSource2 == null) {
 DecoratingDataSource ds = createConnectionFactory2();
 dataSource2 = DataSourceFactory.installDBDictionary
 (getDBDictionaryInstance(), ds, this, true);
 }
 return dataSource2;
 }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (OPENJPA-144) JDBCConfigurationImpl does not support JNDI lookup for non-jta-data-source.

2007-02-13 Thread Patrick Linskey (JIRA)

[ 
https://issues.apache.org/jira/browse/OPENJPA-144?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12472786
 ] 

Patrick Linskey commented on OPENJPA-144:
-

Are you also specifying a jta-data-source, or only a non-jta-data-source? If 
specifying both, what error do you get when you don't specify a 
non-jta-data-source at all? I believe that there could be a problem, but I did 
some work a while back that makes it unnecessary to specify a 
non-jta-data-source if you're specifying a jta-data-source. That code works on 
WebLogic, but that's the only environment that I've tested it in.

 JDBCConfigurationImpl does not support JNDI lookup for non-jta-data-source.  
 -

 Key: OPENJPA-144
 URL: https://issues.apache.org/jira/browse/OPENJPA-144
 Project: OpenJPA
  Issue Type: Bug
  Components: jdbc
 Environment: WebSphere 6.1 
Reporter: Brad L Vandermoon

 A non-jta-data-source is required for DB2 sequences; however, 
 org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl does not support a JNDI 
 lookup for this data source from the openjpa.ConnectionFactory2Name property 
 as documented (refer to section 5.12 and 4.2.1 of the OpenJPA manual).
 It seems like the same implementation for the jta-data-source should be 
 implemented for the non-jta-data-source.  i.e.
 // ADD createConnectionFactory2()
 private DecoratingDataSource createConnectionFactory2() {
 DataSource ds = (DataSource) connectionFactory2.get();
 if (ds != null)
 return setupConnectionFactory(ds, true);
 ds = (DataSource) super.getConnectionFactory2(); // JNDI lookup
 if (ds == null)
 ds = DataSourceFactory.newDataSource(this, true);
 return setupConnectionFactory(ds, true);
 }
 // MODIFY this method 
 public Object getConnectionFactory2() {
 // override to configure data source
 if (dataSource2 == null) {
 DecoratingDataSource ds = createConnectionFactory2();
 dataSource2 = DataSourceFactory.installDBDictionary
 (getDBDictionaryInstance(), ds, this, true);
 }
 return dataSource2;
 }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.