Hello, I just finished committing some changes to the jrmp package which will
allow EJB home and bean handles to "remember" the container from which they
came from.  I documented the new behavior in a change note, so I won't go
over that again here.

I updated jbosstest to verify that this works as planned, and it does...
but, as a side effect the test will fail if the container is not setup to
make use of this feature.

I modified the testbean tests so that before attempting to restore an object
from it's handle that the system properties contain bogus values for
provider url and context factory, thus ensuring that the handle is using its
saved versions.

This works as planned, unless the container being tested does not have the
org.jboss.ejb.plugins.jrmp.interfaces.InitialContextHandle.environment set,
or if the url it points to is not valid, or does not contain the correct
properties to get back to the issuing container.

I thought that a different suite could be added to solve this, but I am not
really sure.  It seems to me that this should be the default behavior and in
most cases a user will not want to disable it.  That said the configuration
of the environment could cause some problems to arise.

I wanted to let the rest of you know about the possible "problem" that could
arise when using the test suite and ask for any advise on what would be a
better way to avoid problems like this.

I also wanted to share some ideas that I had on how to use the modifications
that I made with HA or auto-generated env properties.  Basically I think
that the above property could also point to the name of a class.  This class
could implement either a generic factory interface, or perhaps we could add
an interface for InitialContextHandle.

The default class would simply inspect the current naming server via
JMX (perhaps even some authentication credientials... though I don't really
know how that would work) for port and use that to generate the
InitialContextHandle which is passed to each of the proxy instances.  Note
that the current design only creates on InitialContextHandle
per-classloader (since it caches the handle in a private static).  We could
then omit the property in jboss.properties, and use the default (current
the default would disable the feature).

This would simplify the configuration, by eliminating the need for a
handle-jndi.properties file.  This same mechanism could also be used to plug
in a HA aware InitialContextHandle impl that would use jini, raw multicast
or whatever to find a suitable container.

If anyone else has any ideas on the matter I would like to hear them.  If I
do not hear anything that I think I will work on implementing the above.

A final note, I did test this, both with the test-suite and with some
external jython scripts, but if anyone finds a problem please let me know so
I can get it fixed.

--jason


_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to