You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by ivanrc <ir...@indra.es> on 2007/10/17 17:22:04 UTC

Data source configuration of Apache Derby Network Server´s with client driver

Hi,

I would like to know if I can define the Derby DataSource (derby-ds) to use
the client driver  (org.apache.derby.jdbc.ClientDriver) because I have ready
an Apache Derby Network server listening  on port 1527.

If someone can write me down some example, I´ll be very glad 

Thanks.
-- 
View this message in context: http://www.nabble.com/Data-source-configuration-of-Apache-Derby-Network-Server%C2%B4s--with-client-driver-tf4640956s2354.html#a13254958
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Data source configuration of Apache Derby Network Server´s with client driver

Posted by Bruce Snyder <br...@gmail.com>.
On Thu, Sep 4, 2008 at 4:22 PM, zzztimbo <ti...@chan.net> wrote:
>
> I have a similar setup, but I get this warning when starting up activemq.
>
>
> WARN  JDBCPersistenceAdapter         - Database driver NOT recognized:
> [apache_derby_network_client_jdbc_driver].  Will
> use default JDBC implementation.
>
> I've read that you're supposed to explicitly specify the adaptor to use:
>
> <jdbcPersistenceAdapter
> adapterClass="org.apache.activemq.store.jdbc.adapter.ImageBasedJDBCAdaptor"/>
>
> http://mail-archives.apache.org/mod_mbox/activemq-users/200705.mbox/<d2...@mail.gmail.com>
>
>
> I have no clue where to place this in my activemq.xml file.

The <jdbcPersistenceAdapter> element must be placed inside the
<broker> element inside a <persistenceAdapter> element. Below is an
example:

<broker ...>
...
  <persistenceAdapter>
    <jdbcPersistenceAdapter ... />
  </persistenceAdapter>
...
</broker>

Please note that the use of the JDBC persistence adapter is going to
be much slower than journaled JDBC. And if you're using ActiveMQ 5.x
the AMQ store is even faster than journaled JDBC. For more
information, see the following:

http://activemq.apache.org/persistence.html

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache ActiveMQ - http://activemq.org/
Apache Camel - http://activemq.org/camel/
Apache ServiceMix - http://servicemix.org/

Blog: http://bruceblog.org/

Re: Data source configuration of Apache Derby Network Server´s with client driver

Posted by zzztimbo <ti...@chan.net>.
I have a similar setup, but I get this warning when starting up activemq.


WARN  JDBCPersistenceAdapter         - Database driver NOT recognized:
[apache_derby_network_client_jdbc_driver].  Will
use default JDBC implementation.

I've read that you're supposed to explicitly specify the adaptor to use: 

<jdbcPersistenceAdapter
adapterClass="org.apache.activemq.store.jdbc.adapter.ImageBasedJDBCAdaptor"/>

http://mail-archives.apache.org/mod_mbox/activemq-users/200705.mbox/<d2...@mail.gmail.com>


I have no clue where to place this in my activemq.xml file. 




ivanrc wrote:
> 
> yata!
> 
> It´s very easy!
> 
> 
> <bean id="derby-ds" class="org.apache.commons.dbcp.BasicDataSource"
> destroy-method="close">
>     <property name="driverClassName"
> value="org.apache.derby.jdbc.ClientDriver"/>
>     <property name="url" value="jdbc:derby://localhost:1527/activemq"/>
>     <property name="poolPreparedStatements" value="true"/>
>   </bean>
> 
> org.apache.derby.jdbc.ClientDriver is into derbyclient.jar that come with
> derby installation zip file
> 
> 
> 
> 
> 
> 
> ivanrc wrote:
>> 
>> Hi,
>> 
>> I would like to know if I can define the Derby DataSource (derby-ds) to
>> use the client driver  (org.apache.derby.jdbc.ClientDriver) because I
>> have ready an Apache Derby Network server listening  on port 1527.
>> 
>> If someone can write me down some example, I´ll be very glad 
>> 
>> Thanks.
>> 
> 
> 
"http://mail-archives.apache.org/mod_mbox/activemq-users/200705.mbox/<d256f9c80705060907p664a8f5dveb0c50f10a1f7105@mail.gmail.com
">http://mail-archives.apache.org/mod_mbox/activemq-users/200705.mbox/<d2...@mail.gmail.com> 
-- 
View this message in context: http://www.nabble.com/Data-source-configuration-of-Apache-Derby-Network-Server%C2%B4s--with-client-driver-tp13254958p19321231.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Data source configuration of Apache Derby Network Server´s with client driver

Posted by ivanrc <ir...@indra.es>.
yata!

It´s very easy!


<bean id="derby-ds" class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
    <property name="driverClassName"
value="org.apache.derby.jdbc.ClientDriver"/>
    <property name="url" value="jdbc:derby://localhost:1527/activemq"/>
    <property name="poolPreparedStatements" value="true"/>
  </bean>

org.apache.derby.jdbc.ClientDriver is into derbyclient.jar that come with
derby installation zip file






ivanrc wrote:
> 
> Hi,
> 
> I would like to know if I can define the Derby DataSource (derby-ds) to
> use the client driver  (org.apache.derby.jdbc.ClientDriver) because I have
> ready an Apache Derby Network server listening  on port 1527.
> 
> If someone can write me down some example, I´ll be very glad 
> 
> Thanks.
> 

-- 
View this message in context: http://www.nabble.com/Data-source-configuration-of-Apache-Derby-Network-Server%C2%B4s--with-client-driver-tf4640956s2354.html#a13268944
Sent from the ActiveMQ - User mailing list archive at Nabble.com.