There appears to be a bug in the JDBCDatasourceLoader:

When the constructor is called, then name passed in from the MLET tag is
used to set the PoolName.

When the getObjectName function is called, the name is made up of  DOMAIN +
":service=JDBCDataSourceLoaded" + Pool.JNDI_NAME.  Since the JNDI_NAME
hasn't been set yet, it is impossible to reference this bean in the
Configuration file, JBoss.jcml.

For example if I have the service set up as :

<MLET CODE="org.jboss.jdbc.JDBCDataSourceLoader" ARCHIVE="jboss.jar"
CODEBASE="../../lib/ext/">
    <ARG TYPE="java.lang.String" VALUE="MySQL">
</MLET>

The following, which I expect to work, doesn't:

     <mbean name="DefaultDomain:service=JDBCDataSource,name=MySQL">
       <attribute name="Properties"/>
       <attribute name="URL">jdbc:mysql://localhost/JBoss</attribute>
       <attribute name="GCMinIdleTime">1200000</attribute>
        .... SNIP ....
     </mbean>

because the JNDI name for the pool hasn't been set, only the pool name has
been set to MySQL.  Fix is to use the poolName attribute in the
getObjectName method of JDBCDataSourceLoader :

    public ObjectName getObjectName(MBeanServer parm1, ObjectName parm2)
throws javax.management.MalformedObjectNameException {
>>        return new ObjectName(OBJECT_NAME+",name="+source.getPoolName());
    }


      David Maddison
<<   WILDFUSION >>



--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to