Deadman, Hal wrote:
> Could someone post a working mbean configuration entry that uses
> JDBCDataSourceLoader? An example that uses Oracle would be nice but I will
> take anything. I need a non-transaction connection from a datasource so I
> can do a little jdbc outside the ejb containers. From what I can tell
> JDBCDataSourceLoader is the way to do that. I have tried both of the
> following:
>
>
> <mbean code="org.jboss.jdbc.JDBCDataSourceLoader"
> name="DefaultDomain:service=JDBCDataSource,name=odtos_SeqDatabase">
> <attribute name="PoolName">odtos_SeqDatabase</attribute>
> <attribute
> name="DataSourceClass">oracle.jdbc.pool.OracleDataSource</attribute>
> <attribute
> name="Properties">URL=jdbc:oracle:thin:@bdsburn:1521:odtos/odtos@otdos</attr
> ibute>
> </mbean>
>
> <mbean code="org.jboss.jdbc.JDBCDataSourceLoader"
> name="DefaultDomain:service=JDBCDataSource,name=odtos_SeqDatabase">
> <attribute name="PoolName">odtos_SeqDatabase</attribute>
> <attribute
> name="DataSourceClass">oracle.jdbc.pool.OracleDataSource</attribute>
> <attribute name="URL">jdbc:oracle:thin:@bdsburn:1521:odtos</attribute>
> <attribute name="JDBCUser">odtos</attribute>
> <attribute name="Password">odtos</attribute>
> </mbean>
>
> but I get a NullPointerException in the JDBCDataSourceLoader.getObjectName()
> error when I start up Jboss 2.1. Here is the getObjectName() method:
> public ObjectName getObjectName(MBeanServer parm1, ObjectName parm2)
> throws javax.management.MalformedObjectNameException {
> return new ObjectName(OBJECT_NAME+",name="+source.getJNDIName());
> }
>
> I think the only way a NPE can occur is if the JDBCDataSourceLoader was
> created with a no args constructor which fails to initialize the "source"
> variable.
You are correct. It seems that JDBCDataSourceLoader is borked.
Can you please try adding the initialisation of source to the no args
constructor and see if that works?
If that fixes it, please post a patch in the SourceForge patch tracker
and I'll commit it.
Thanks for the report,
Toby.
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user