On Jul 21, 2011, at 8:15 PM, rnieto wrote:
> I had to add the created spnego jar in the tomcat\lib folder, along with the
> openejb-loader and openejb-tomcat. It seems to initialise well, until
> openejb starts initialising and pops-up with this error:
>
> 21 Jul 2011 19:59:31.243 [main] Jndi name could not be bound; it may be
> taken by another ejb.
> Jndi(name=openejb/Deployment/openejb/ConfigurationInfo/org.apache.openejb.assembler.classic.cmd.ConfigurationInfo!Remote)
> 21 Jul 2011 19:59:31.243 [main] Undeploying app: classpath.ear
> 21 Jul 2011 19:59:31.263 [main] Application could not be deployed:
> classpath.ear
> org.apache.openejb.OpenEJBException: Creating application failed:
> classpath.ear: Unable to bind business remote deployment in jndi.
>
>
> (I don't have a classpath.ear deployed anywhere) It seems that if I create
> an instance of the custom filter that was made, it initialises the core of
> OpenEJB too early. Even with this error, OpenEJB continues loading and I
> could access my web service. But then it fails on the same point as the
> original thing I did with the spnego filter, *the filter doesn't get called
> when accessing OpenEJB web services*. It gets invoked when accessing any
> other web resource within the server, even things under the OpenEJB folder
> just not the web services.
Did you try out my suggestion of making a Filter that uses a RequestDispatcher
to forward(req, res); the call to the web service? Assuming you can forward to
another servlet context it should work.
Theoretically the call chain would look like so:
HTTP
|
|
SpnegoHttpFilter
SpnegoSecurityServiceFilter (optional)
CustomForwardingFilter
|
RequestDispatcher.forward
|
\---> WebService URL
Tomcat should be doing that all with the same thread and same request/response
objects.
-David