AnsweredAssumed Answered

JNDI Datasource  / JDBC in OSGI Karaf

Question asked by mwolf on Jan 29, 2017
Latest reply on Jan 31, 2017 by gdharley

Hello Everybody! I try to change my code to use a nother database instead of h2, but i run in errors. 

 

I try to set my  datasource in the blueprint to:

 

 

 

<bean id="dataSource" class="org.mariadb.jdbc.Driver">
    <property name="url" value="jdbc:mariadb://172.22.90.182:3306/jbpmn" />
    <property name="username" value="root" />
    <property name="password" value="admin" />
</bean>

when i try to pass it into the processengine configuaration as datasource i got the error that the driver did not know the url property.

 

My Processengine config:

 

 

 

<reference id="transactionManager" interface="javax.transaction.TransactionManager"/>


<bean id="configuration" class="org.activiti.engine.impl.cfg.JtaProcessEngineConfiguration"
      ext:field-injection="true">
    <property name="databaseType" value="h2"/>
    <property name="dataSource" ref="dataSource"/>
    <property name="transactionManager" ref="transactionManager"/>
    <property name="databaseSchemaUpdate" value="true"/>
    <property name="transactionsExternallyManaged" value="true"/>
    <property name="defaultCamelContext" value="defaultContext"/>
    <property name="mailServerHost" value="$[cfg.mailServerHost]"/>
    <property name="mailServerUsername" value="$[cfg.mailServerUsername]"/>
    <property name="mailServerPassword" value="$[cfg.mailServerPassword]"/>
    <property name="mailServerPort" value="$[cfg.mailServerPort]"/>
    <property name="useSSL" value="$[cfg.useSSL]" />
    <property name="useTLS" value="$[cfg.useTLS]" />
    <property name="mailServerDefaultFrom" value="$[cfg.mailServerDefaultFrom]"/>
</bean>

 

 

has anybody an idear how to configure it as datasource in osgi container karaf?

 

 

Cheers marcel

Outcomes