-
1. Re: Stop/Restart XADataSource Service in 2.4.8
jsurf Sep 6, 2002 8:49 AM (in response to jsurf)I found it !
It's a bug in XADatasourceLoader:
The connection pool is not correctly unbound:
It uses NonSerializableFactory for binding the Datasource to JNDI but not for unbind:
private void bind(Context ctx, String name, Object val) throws NamingException
{
// Ah ! Session isn't serializable, so we use a helper class
NonSerializableFactory.bind(name, val);
...
}
Here is the bug:
public void stopService()
{
// Unbind from JNDI
try {
String name = getSource().getPoolName();
new InitialContext().unbind("java:/"+name);
...
}
should be:
public void stopService()
{
// Unbind from JNDI
try {
String name = getSource().getPoolName();
// new InitialContext().unbind("java:/"+name); // Perhaps i need both unbind ??
NonSerializableFactory.unbind("java:/"+name);
...
}
so that it is removed from the internal map of NonSerializableFactory -
2. Re: Stop/Restart XADataSource Service in 2.4.8
jsurf Sep 6, 2002 8:53 AM (in response to jsurf)And a short look in NonSerializableFactory, shows the correct code:
String name = getSource().getPoolName();
new InitialContext().unbind("java:/"+name); NonSerializableFactory.unbind("java:/"+name);
Both unbind operations are needed!