On Feb 25, 2010, at 3:15 AM, Jean-Louis MONTEIRO wrote:
Hey,
I'd like to get your opinion regarding openejb-jar.xml descriptor.
I need to change the JNDI pattern as explained here
http://openejb.apache.org/3.0/jndi-names.html
http://openejb.apache.org/3.0/jndi-names.html .
So, i created a new file openejb-jar.xml containing:
<openejb-jar>
<properties>
openejb.jndiname.format = <my pattern>
</properties>
</openejb-jar>
FYI, I added that element to the v2 (geronimo-specific) descriptor as
well.
Now, in the same module, i need to activate WS-Security like
explained here
http://openejb.apache.org/securing-a-web-service.html
http://openejb.apache.org/securing-a-web-service.html .
<openejb-jar xmlns="http://openejb.apache.org/xml/ns/openejb-jar-2.2">
<enterprise-beans>
...
<session>
<ejb-name>CalculatorImpl</ejb-name>
<web-service-security>
<security-realm-name/>
<transport-guarantee>NONE</transport-guarantee>
<auth-method>WS-SECURITY</auth-method>
<properties>
wss4j.in.action = UsernameToken
wss4j.in.passwordType = PasswordDigest
wss4j
.in
.passwordCallbackClass=org.superbiz.calculator.CustomPasswordHandler
</properties>
</web-service-security>
</session>
...
</enterprise-beans>
</openejb-jar>
It works like a charm too ;-)
I'm curious how that works for OpenEJB without Geronimo. I don't
think it does even with a v2 descriptor. We probably have more work
to get this stuff configured in OpenEJB standalone/embedded/tomcat
scenarios. Do you know what we're missing on that front? If the ws
security stuff could all be plain properties, we could put them in the
new <properties> element that is now in both the v2 and v3 descriptors
-David