Hi there,
Here my first contribution to the JBoss mailing list, I love the neat
way JBoss is designed. I hope it will outclass Weblogic in our current
application, so we can make the switch!
I have tried to run Cloudscape version 3.0 as an embedded database,
using COM.cloudscape.core.JDBCDriver (not
COM.cloudscape.core.RmiJdbcDriver, as described in previous postings). I
have debugged Cloudscape's obfuscated code for 2 days to discover: It
does not work.
Cloudscape 3.0 does not start in embedded mode because it can not handle
jdbc2.0-stdext.jar and jta-spec1_0_1.jar on the class path. Because if
these jars *are* available, it *can* find the standard extension classes
'javax.transaction.xa.Xid' and 'javax.sql.XADataSource', and therefor
wants to boot a module that is not packaged in the cloudscape.jar.
A collegue of mine heard me swearing and handed me a Cloudscape 3.5.1
CD, and thank god, it works.
Except for one tiny bug in JBoss itself, that occurs when stopping the
connection pool.
In 'org.jboss.util.ServiceMBeanSupport#stop()' the second invocation of
'getName()' results in a null-pointer exception, because the
'stopService()' of the concrete implementation
'org.jboss.jdbc.XADataSourceLoader' has called
'org.jboss.minerva.datasource.XAPoolDataSource#close', which nullifies
the 'pool' variable of 'source'. So calling 'getName()' after
'stopService()' is not valid.
The next method definition for
'org.jboss.util.ServiceMBeanSupport#stop()' fixes this:
-----------
public void stop()
{
if (getState() != STARTED)
return;
// since getName() might not work after stopService()
// we'll get the name here and use it later on
String name = getName();
state = STOPPING;
//AS It seems that the first attribute is not
// needed anymore and use a long instead of a Date
sendNotification(new AttributeChangeNotification(
this, id++, new Date().getTime(), name+" stopping",
"State", "java.lang.Integer",
new Integer(STARTED), new Integer(STOPPING)));
log.log("Stopping");
log.setLog(log);
try
{
stopService();
} catch (Throwable e)
{
log.exception(e);
}
state = STOPPED;
//AS It seems that the first attribute is not
// needed anymore and use a long instead of a Date
sendNotification(new AttributeChangeNotification(
this, id++, new Date().getTime(), name+" stopped",
"State", "java.lang.Integer",
new Integer(STOPPING), new Integer(STOPPED)));
log.log("Stopped");
log.unsetLog();
}
------------
This works fine now (although till now I only started and stopped the
system :-)
Cheers,
Martijn Res
P.S. I know I should have posted this on bugzilla, but 'www.telkel.com'
was not reachable.