We are investigating how to hook up PowerBuilder clients to
an EJB container (Weblogic 6.0). We are attempting to follow some outline ideas tucked away in Weblogic documentation which involve building a Java Bean client and using the OLE packager provided as part of Sun's Java plug-in.
The bean works fine as a standalone client but when packaged and called from PowerBuilder it sets up the InitialContext successfully but the fails when attepting a lookup on the InitialContext with a:
weblogic.utils.AssertionError: *** ASSERTION FAILED ***[Assertion Violated]
Has anyone had experience of successfully wrapping clients as OLE objects?
Just documenting the solution that we have found.
The Weblogic code expects the ContextClassLoader to be set in the client when messges are being marshalled/unmarshalled.
It appears that when the JVM (1.3.1 on NT) is run 'as an OLE object' this ContextClassLoader may be null.
Adding the code:
if (Thread.currentThread().getContextClassLoader() == null)
solved the problem.