AS400/DB2 help
rupshall Feb 11, 2004 4:17 PMHi,
I am new to JBoss and I am encountering a couple problems configuring my datasource. I have tried to use xa and non-xa methods, both appear to partially work but neither completely works.
When I use the non-xa method I have the following
as400-ds.xml:
<local-tx-datasource>
<jndi-name>as400</jndi-name>
<driver-class>com.ibm.as400.access.AS400JDBCDriver</driver-class>
<connection-url>jdbc:as400:://server</connection-url>
<connection-property name="driver">toolbox</connection-property>
<connection-property name="libraries">testlib, *LIBL</connection-property>
<connection-property name="naming">sql</connection-property>
<connection-property name="user">xxx</connection-property>
<connection-property name="password">yyy</connection-property>
<connection-property name="access">all</connection-property>
<connection-property name="char.encoding">UTF-8</connection-property>
<application-managed-security/>
</local-tx-datasource>
useing this datasource file I have the following issues:
1. when I deploy an entity bean it prompts me with a swing signon for the JDBC driver, it ignores username and password from as400-ds.xml
2. it will create the table, deleate the table, allow me to lookup by key but I get this error when I try to create "javax.ejb.CreateException: Could not create entity:java.sql.SQLException: [SQL7008] TSTABLE in TESTLIB not valid for operation."
when I use the xa method :
as400-xa-ds.xml
<xa-datasource>
<jndi-name>as400</jndi-name>
<xa-datasource-class>com.ibm.as400.access.AS400JDBCXADataSource</xa-datasource-class>
<xa-datasource-property name="ServerName">server</xa-datasource-property>
<xa-datasource-property name="Libraries">testlib</xa-datasource-property>
<xa-datasource-property name="User">xxxx</xa-datasource-property>
<xa-datasource-property name="Password">yyyy</xa-datasource-property>
</xa-datasource>
useing this method I have the following problem:
1. it creates the table, deletes the table but when I try to create or find by key I get "javax.ejb.CreateException: Error checking if entity exists:org.jboss.util.NestedSQLException: Failure to delist resource;"
I am new to this and not sure what the benefits of one ds type over another would be, if somebody could enlighten me on that it would be great.
My biggest concern is just getting one of these approaches to work and worry about the other later.
Thanks for any help,
Robert