This content has been marked as final.
Show 2 replies
-
1. Re: JBOSS 3.22 Sybase DB,I Got An Warning Message From Wrapp
realvalkyrie Nov 28, 2007 8:14 PM (in response to realvalkyrie)SRY ,
take the xa DataSource instead of tx DataSource -
2. Re: JBOSS 3.22 Sybase DB,I Got An Warning Message From Wrapp
realvalkyrie Nov 28, 2007 8:51 PM (in response to realvalkyrie)"realvalkyrie" wrote:
The Detail Info in below:
[WrappedConnection] WARN Closing a statement you left open, please do your own housekeeping.
I got connection from the DataSource.
this is my sybase-ds.xml configuration
<local-tx-datasource>
<jndi-name>jdbc/eusr</jndi-name>
<connection-url>jdbc:sybase:Tds:127.0.0.1:2638?ServiceName=eusr</connection-url>
<driver-class>com.sybase.jdbc2.jdbc.SybDataSource</driver-class>
<user-name>TTT</user-name>
<p a s s w o r d>TTT</p a s s w o r d>
<idle-timeout-minutes>5000</idle-timeout-minutes>
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.SybaseExceptionSorter</exception-sorter-class-name>
<min-pool-size>5</min-pool-size>
<max-pool-size>30</max-pool-size>
<metadata>
<type-mapping>Sybase</type-mapping>
</metadata>
</local-tx-datasource>
<local-tx-datasource>
<jndi-name>jdbc/esys</jndi-name>
<connection-url>jdbc:sybase:Tds:127.0.0.1:2638?ServiceName=esys</connection-url>
<driver-class>com.sybase.jdbc2.jdbc.SybDataSource</driver-class>
<user-name>TTT</user-name>
<p a s s w o r d>TTT</p a s s w o r d>
<idle-timeout-minutes>5000</idle-timeout-minutes>
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.SybaseExceptionSorter</exception-sorter-class-name>
<min-pool-size>5</min-pool-size>
<max-pool-size>30</max-pool-size>
<metadata>
<type-mapping>Sybase</type-mapping>
</metadata>
</local-tx-datasource>
Call the Connection code below:
InitialContext initial = new InitialContext();
DataSource dataSource=null;
if(name.indexOf("usr")!=-1)
dataSource =(DataSource) initial.lookup("java:/jdbc/eusr");
else{
dataSource =(DataSource) initial.lookup("java:/jdbc/esys");
}
Connection con = dataSource.getConnection();
return con;
BTW, I got another WARN
[TxConnectionManager$LocalXAResource] Prepare called on a local tx. Use of local transactions on a jta transaction with more than one branch may result in inconsistent data in some cases of failure.
Maybe the solution that is to configure a tx DataSource
I wonder ,did Sybase has tx Datasouce , my sybase version is 12.5.0