EJB3 endpoints into WAR deployments
by Alessio Soldano
Folks,
starting from Jim's testcase for complex examples of EJB3 WS endpoints
deployments into WAR archives, here are some points to start discussion:
* DeploymentType vs EndpointType
Generally speaking, JSR109 v.1.3 allowing EJB3 WS endpoints into WAR
archives makes the design assumption behind
org.jboss.wsf.spi.deployment.Deployment.DeploymentType not valid
anymore. It's not possible to establish a deployment is either JAXWS_JSE
or JAXWS_EJB3, as it can have both pojo and ejb3 endpoints at the same
time. So while it still makes sense and is useful knowing a deployment
is from a WAR or JAR archive, the JSE vs EJB3 piece of information is
something related to each endpoint. So I propose we modify that
DeploymentType to have something like JAXWS_WAR and JAXWS_JAR and add a
new EndpointType enum in org.jboss.wsf.spi.deployment.Endpoint for JSE
and EJB3 endpoint types.
As a consequence, we'll need multiple fixes:
- ContainerMetaDataDeploymentAspect: the endpoint type needs to be
considered for properly attaching metadata
- EndpointHandlerDeploymentAspect: the endpoint type is to be used for
deciding which invocation handler to set in each endpoint
- EndpointAddressDeploymentAspect: this also needs to consider the
endpoint type for figuring out if a confidential/secure transport
address is required
- WebMetaDataCreatingDeploymentAspect: not sure, but this might also
require some tuning / fix
- ServletHelper: the current hook in place for calling the
InjectionHelper needs to consider the endpoint type
* Computation of context-root
[1] has the current algorithm. For the "mixed" situation where an EJB3
WS endpoint lives into a WAR deployment (with or without other POJO
endpoints), I assume we should have a different implicit context-root
(point 5 in [1]), being the same has the context-root for the webapp
associated to the WAR archive. So both POJO and EJB3 endpoints share the
context-root of the war.
* Where to look at descriptors (wsdl, xsd, jbossws-cxf.xml, ...)
Here I would say we first look at eventual requirements from the specs I
might forgetting here, otherwise the type of the archive drives the
position (i.e. WEB-INF/... for war archives, even if the endpoint is an
EJB3 one)
What do you think?
Jim, once everything is clear here, can you work on this?
Cheers
Alessio
[1]
http://community.jboss.org/wiki/JBossWS-FAQ#How_do_I_know_what_endpoint_a...
--
Alessio Soldano
Web Service Lead, JBoss
13 years, 4 months