Here is a Mail that wasn't sent to jonas-users community.
--
Philippe
Philippe Coq Groupe Bulll/BullSoft/OpenMaster Phone: (33) 04 76 29 78
49
Bull S.A - 1 rue de Provence - 38432 Echirolles Cedex France
[EMAIL PROTECTED] http://www-frec.bull.com
Download our EJBServer at http://www.bullsoft.com/ejb
Hello,
I appreciate your enthusiastic development. Jonas is now one of the most
powerful EJB server in the world. Today, I'll contribute some patch
code.
I found some issues on Jonas2.0. They are:
1. Closing the actual JDBC connection at shutdown
The current implementation of ConnectionManager is responsible for
closing the actual JDBS connection after the specified time passed. It
is the great improvement. But there is the possibility that some
connections remain opened at the server shutdown. This doesn't matter
for most RDB, but as for InstantDB, it results in the problem. Anymore,
it is desirable to close all the actual JDBC connection when the server
is shutdown.
2. 'ejbRemove()' on the session bean instance
According to the EJB Spec 1.1, the 'ejbRemove()' on the session bean
instances have nothing to do with the 'remove' on the home or remote
interface. The container can invoke 'ejbRemove()' on the session bean
instance at its convenience. But when the container discards the session
bean instance, it should invoke 'ejbRemove()' on it. And it is not true
for the current implementation of Jonas2.0. So the session bean instance
must reply on the client call of 'remove()' and this is not good. When
the server shutdown, the container only unbinds the available session
bean instances. Thus the session bean instance has no chance to achieve
some clean tasks, such as closing active connections, normally which are
done within 'ejbRemove()'.
To solve these problems, the slight modification will be enough.
I've modified the following classes:
org.objectweb.jonas.container.Container
org.objectweb.jonas.container.JSessionHome
org.objectweb.jonas.dbm.ConnectionManager
org.objectweb.jonas.dbm.DataBaseManager
org.objectweb.jonas.tools.GenICSessionHome
and the modified source is attached to this mail.
After extracted, the directory of oop_patch is created, and under the
directory, the subdirectory of 'modified_src' contains the modified
soures while 'modified_org' contains the original sources.
Within in the source code, the lines between
//Start:Jun Inamori modified
and
//End:Jun Inamori modified
are modified.
To compile the sources and update the jar files, simply run the shell
script of 'build_update.sh', assuming the CLASSPATH and JONAS_ROOT are
set to the appropriate values.
Any questions and comments are welcome.
Happy Java programming!
Jun Inamori
E-mail: [EMAIL PROTECTED]
URL: http://www.oop-reserch.com
jonas_patch.tar.gz