camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From moj0002 <>
Subject JDBC component and jboss ds.xml file
Date Sat, 12 Apr 2014 04:37:53 GMT
I have my data source defined in a jboss ds file (myDB2Database-ds.xml) that
goes either in the jboss deploy directory or ds directory

<?xml version="1.0" encoding="UTF-8"?>
... more properties here

In my spring application context I define my route

<import resource="classpath:sql-beans.xml"/>

    <camelContext xmlns="">
            <from uri="timer://foo?fixedRate=true&amp;period=1m"/>
            <to uri="bean://sqlBean"/> 
            <to uri="jdbc://java:myDatasource"/> 

My sqlBean is just a simple

public class SqlBean 
       public String toSql() 
	 return "select current timestamp from sysibm.sysdummy1";            

I can't figure out how to reference the jndi data source (myDataSource)
defined in the ds.xml file
<to uri="jdbc://java:myDatasource"/> 
is not working.  

How do I get the data source registered so I can get a handle to it?

Looks like osgi uses <reference> but I am not running in an OSGI container,
just plain JBOSS 5.2 J2EE.

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message