![]() |
|
|
|
|
1
5th September 05:55
External User
Posts: 1
|
Hi,
Im trying to get jboss 3.2.2 running against an ingres database. I have tried doing the ingres-service.xml file but i get a jndiname not found error. I used this for the source for the ingres-service.xml http://esupport.ca.com/public/cool/j...oss30Joe31.pdf page 26. So i created an ingres-ds.xml file modifying the hsqldb-ds.xml file so it pointed to the edbc driver. then jboss said Trying to install an already registered mbean: jboss.jca:service=LocalTxCM,name=IngresDS) have i put something in the ingres-ds.xml file that i shouldn't have? ingres-ds.xml <?xml version="1.0" encoding="UTF-8"?> <datasources> <local-tx-datasource> <jndi-name>IngresDS</jndi-name> <connection-url>jdbc:edbc://mymachine:a01/machinename::database</connection-url> <!-- The driver class --> <driver-class>ca.edbc.jdbc.EdbcDriver</driver-class> <min-pool-size>5</min-pool-size> <max-pool-size>20</max-pool-size> <idle-timeout-minutes>0</idle-timeout-minutes> <track-statements>true</track-statements> </local-tx-datasource> </datasources> incidentally the url i have used works when tested by a simple java program. also when i run jboss jboss without the ingres-service.xml it starts up fine though i haven't tested whether it connects to the database yet. can anyone shed some light on this for me? Thanks Bevyn |
|
|
|
|
2
5th September 05:55
External User
Posts: 1
|
Hi,
We use JBoss/Ingres at my work, albeit mainly JBoss 3.0.3, and the Caribou Lake driver. We have set up EDBC with JBoss 3.2.x though. The ingres-service.xml file is no longer needed in the 3.2.x releases of JBoss (they were used in 3.0.x) This file should be located under $JBOSS_HOME/server/default/deploy. It is the only datasource config file required under 3.2.2. The EDBC client side JAR file should be placed somewhere that the JBoss container can load it (e.g. $JBOSS_HOME/server/default/lib). If you do this - and your JDBC URL is correct then JBoss should automatically create the pooled datasource. How are you testing the datasource? The datasources configured in JBoss are accessible to applications that are deployed in the EJB/web container (e.g. an EJB, Servlet, JSP ...etc). You could create a simple Stateless Session EJB that obtains a JDBC connection from the datasource.Accessing the datasource to get a connection should be as simple as the following; InitialContext ctx = new InitialContext(); DataSource ds = (DataSource)ctx.lookup("IngresDS"); Connection conn = ds.getConnection(); Check out the Datasources forum at http://www.jboss.org if you're still stuck. Thanks and regards, Andrew |
|
|
|