I think I've run into a classic chicken-and-egg problem trying to get yoko hooked into Geronimo.

Let me recap the situation first, and the consensus solution we came up with earlier. To fully enable the SSL transport for Yoko, it's necessary to cause Yoko to load a socket factory object that will be used to sort out what sort of sockets need to get created for a given connection situation. This socket factory needs access to information held by the creating CORBABean or CSSBean object. The socket factory is enabled by setting an argument on the call to ORB.init() to identify the name of the socket factory class, and there's an additional optional argument that can contain a single string value that's passed to the socket factory's init() method.

So, to hook the socket factory back to the launching CORBABean or CSSBean object, the socket factory argument value is set to the abstract name for the associated bean instance, and the socket factor init() method retrieves the reference using:
            Kernel kernel = KernelRegistry.getSingleKernel();
config = (ORBConfiguration)kernel.getGBean(new AbstractName(new URI(configName)));

I'm getting the ORB launched, the socket factory class is getting loaded and the init() is failing with the following exception:

java.lang.IllegalStateException: GBean is not running: org.apache.geronimo.configs/j2ee-corba/1.2-SNAPSHOT/car?ServiceModule=org.apache.geronimo.configs/j2ee-corba/1.2-SNAPSHOT/car,j2eeType=CORBABean,name=Server


In the calling sequence, the ORB is initialized in the CORBABean or CSSBean doStart() method, so these beans are not yet in a started state when the socket factory gets initialized. I'm unable to delay resolution of the bean because the first actions required of the socket factory occur before the doStart() methods return. The best solution I've come up thus far would be to keep a private registry of the beans in the ORBConfigAdapter class as static methods, and have the SocketFactory use that to retrieve the reference. I'd rather not resort to that if there is a better solution.

Rick


Reply via email to