--- (Scanned for viruses ) ---
StatelessEJBProvider.java.patch was scanned and no virus was found.
StatelessEJBProvider.java was scanned and no virus was found.
---------------------------------------------------------
Hi,
We are using the StatelessEJBProvider but ran into a problem of Orion
requiring extra credentials in the properties when creating the
InitialContext. Its not really an option to use the anoynmous user, so we
had to specify these in the deployment descriptor. I have modified the
StatelessEJBProvider to make entering these properties possible and thought
that is might be useful to other people. It would be good if we could use
an unmodified SOAP jar, so I'm submitting these in case you decide its a
good change, or even just to spur the SOAP developers on to make the change
themselves in the way they prefer. Its also a change that would be valid
for the other ejb providers.
Our deployment descriptor now looks like this (the bean is one of the J2EE
demo beans, and yes I do realise this demo is really stateful but I added
another create method and used it anyway). the prefix of jndi: signifies
it should be passed to the initialcontext, stripped of the prefix.
<?xml version="1.0"?>
<isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment" id
="urn:Cart">
<isd:provider type="org.apache.soap.providers.StatelessEJBProvider" scope
="Application" methods="create addBook removeBook getContents">
<isd:option key="FullHomeInterfaceName" value="CartHome" />
<isd:option key="JNDIName" value="java:comp/env/ejb/Cart"/>
<!-- <isd:option key="ContextProviderURL" value="ormi://localhost/cart"
/> -->
<!-- <isd:option key="FullContextFactoryName" value
="com.evermind.server.ApplicationClientInitialContextFactory" /> -->
<isd:option key="jndi:java.naming.factory.initial" value
="com.evermind.server.ApplicationClientInitialContextFactory" />
<isd:option key="jndi:java.naming.provider.url" value
="ormi://localhost/cart" />
<isd:option key="jndi:java.naming.security.principal" value="admin" />
<isd:option key="jndi:java.naming.security.credentials" value="123" />
</isd:provider>
<isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultListener>
</isd:service>
BTW I've commented out the bit about default jndi properties, but thinking
about it, a better default (if no jndi: properties specified) might be to
call the new InitialProperties() constructor without any properties. Since
if the SOAP webapp is deployed to a J2EE container the default context is
going to be the container.
BTW2 In the unmodified version (2.2) a naming error is shown incorrectly,
even though the url is specified and used, the default url is shown
instead.
Anyway heres my attempt at it, the patch might be a bit useless, but you
should be able too understand what I was trying to do from the complete
source.
(See attached file: StatelessEJBProvider.java.patch)(See attached file:
StatelessEJBProvider.java)
Yuri Schimke
Forge Research Pty Ltd
StatelessEJBProvider.java.patch
StatelessEJBProvider.java