[JCA/JBoss] - Jboss 5.0.1 & ha-local-tx-datasource
by mcrandal
Hi,
I am having an issue deploying a ha-local-tx-datasource into JBoss 5.0.1 (Java 6 version). local-tx-datasource works fine but when I deploy a ha datasource nothing seems to happen, i.e. nothing is logged to console, and the file appears in the web-console, but no datasource.
This is the xml, from my -ds.xml file:
| <datasources>
| <ha-local-tx-datasource>
| <jndi-name>jdbc/DBConnection</jndi-name>
| <connection-url>jdbc:oracle:thin:@db1:1521:db1|jdbc:oracle:thin:@db2:1521:db2</connection-url>
| <url-delimiter>|</url-delimiter>
|
| <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
| <user-name>USERNAME</user-name>
| <password>PASSWORD</password>
|
| <!-- The minimum connections in a pool/sub-pool. Pools are lazily constructed on first use -->
| <min-pool-size>2</min-pool-size>
|
| <!-- The maximum connections in a pool/sub-pool -->
| <max-pool-size>20</max-pool-size>
|
| <!-- sql to call on an existing pooled connection when it is obtained from pool - the OracleValidConnectionChecker is prefered -->
| <check-valid-connection-sql>select 1 from dual</check-valid-connection-sql>
|
| <!-- Uses the pingDatabase method to check a connection is still valid before handing it out from the pool -->
| <valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker</valid-connection-checker-class-name>
|
| <!-- Checks the Oracle error codes and messages for fatal errors -->
| <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
|
| <!-- sql to call when connection is created
| <new-connection-sql>some arbitrary sql</new-connection-sql>
| -->
|
| </ha-local-tx-datasource>
|
| </datasources>
|
If it helps this file works perfectly in JBoss 4.0.3
Thanks for your help
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4214626#4214626
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4214626
15 years, 10 months
[Microcontainer] - Re: JBossTransactionServices and WebBeans
by alesj
"alesj" wrote : "david.allen" wrote :
| | how to best inject the RealTransactionManager bean into one of our
| | beans.
| |
| | I modified webbeans-ejb-jboss-beans.xml to also have the following bean
| | declaration:
| |
| | | <beanfactory name="JBossTransactionServices"
| | | class="org.jboss.webbeans.integration.ejb.JBossTransactionServices">
| | | <property name="controller"><inject
| | | bean="jboss.kernel:service=KernelController" /></property>
| | | <property name="transactionManager"><inject
| | | bean="RealTransactionManager" /></property>
| | | </beanfactory>
| | |
| |
| | That class/bean just needs the javax.transaction.TransactionManager that
| | the AS is using.
| |
| Add option="callback" attribute to TM's inject.
| This will inject your TM once it's available.
|
Unfortunately this won't work with bean factory.
But do you really need bean factory, or is plain bean enough?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4214615#4214615
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4214615
15 years, 10 months
[JNDI/Naming/Network] - spring 2.5.6/jboss4.2.3 JNDI nested exception is javax.namin
by surjitbains
I'm still getting this error with spring 2.5.6/jboss4.2.3
persistence definition
jboss-web.xml
<?xml version="1.0" encoding="UTF-8"?>
<jboss-web>
<security-domain>java:/jaas/clients</security-domain>
<resource-ref>
<res-ref-name>jdbc/JRWDS</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<jndi-name>java:JRWDS</jndi-name>
</resource-ref>
</jboss-web>
entry in web.xml
<resource-ref>
<res-ref-name>jdbc/JRWDS</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
datasource file mssql-ds.xml in deploy jboss folder
<local-tx-datasource>
<jndi-name>JRWDS</jndi-name>
<connection-url>jdbc:microsoft:sqlserver://xxx</connection-url>
<driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver </driver-class>
<user-name>xxxx</user-name>
xxxx
<!-- sql to call when connection is created
<new-connection-sql>some arbitrary sql</new-connection-sql>
-->
<!-- sql to call on an existing pooled connection when it is obtained from pool
<check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
-->
<!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
<type-mapping>MS SQLSERVER2000</type-mapping>
</local-tx-datasource>
the JNDI resource is bound ...
12:37:24,937 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=JRWDS' to JNDI name 'java:JRWDS'
but my app deployed apps fails
nested exception is javax.naming.NameNotFoundException: JNDI object with [java:JRWDS] not found: JNDI implementation returned null
any clues....?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4214613#4214613
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4214613
15 years, 10 months