c3p0 datasource vs JBoss JMS module

View: New views
1 Messages — Rating Filter:   Alert me  

c3p0 datasource vs JBoss JMS module

by Jakub Danilewicz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I have another problem with plugging c3p0-based (v. 0.9.1) datasource
into JBoss 4.2.x environment. This time the troublemaker is the standard
JMS module bundled with the JBoss server.

Once I define a c3p0 datasource through a "/deploy/c3p0-service.xml" file:

    <mbean code="com.mchange.v2.c3p0.jboss.C3P0PooledDataSource"
name="jboss.jca:service=DataSourceBinding,name=jdbc/mydb">
        <attribute name="JndiName">jdbc/mydb</attribute>
        <attribute
name="JdbcUrl">jdbc:postgresql://host:5432/db-name</attribute>
        <attribute name="DriverClass">org.postgresql.Driver</attribute>
       ....
    </mbean>


the following "JMS-2-DB" configuration set in the
"/deploy/jms/postgres-jdbc2-service.xml" file ceases to work:

   <mbean code="org.jboss.mq.pm.jdbc2.PersistenceManager"
name="jboss.mq:service=PersistenceManager">
      <depends
optional-attribute-name="ConnectionManager">jboss.jca:service=DataSourceBinding,name=jdbc/mydb</depends>
      <attribute name="SqlProperties">
       ....


The exception is like the one below:

2009-09-15 WARN  [org.jboss.system.ServiceController] Problem starting
service jboss.mq:service=PersistenceManager
javax.management.AttributeNotFoundException: not found: BindName
        at
org.jboss.mx.server.AbstractMBeanInvoker.getAttribute(AbstractMBeanInvoker.java:335)
        at
org.jboss.mx.server.MBeanServerImpl.getAttribute(MBeanServerImpl.java:556)
        at
org.jboss.mq.pm.jdbc2.PersistenceManager.initializeFields(PersistenceManager.java:1831)


I have tried various naming conventions for the c3p0 mbean (e.g.:
"jboss:service=JMSPooledDS"), but the exception being thrown was always
the same.

Any ideas?

Cheers,

j-d

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
c3p0-users mailing list
c3p0-users@...
https://lists.sourceforge.net/lists/listinfo/c3p0-users