Comments inlined:
Rio
On 08/29/2011 04:52 PM, Alessio Soldano wrote:
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.
IIRC you Alessio said few days ago that users can mix both
JAXWS &
JAXRPC endpoints in one deployment.
Considering this information DeploymentType abstraction doesn't make
sense at all.
I'd say we won't have DeploymentType abstraction anymore.
We will just have EndpointType abstraction with the following values:
* JAXWS_POJO
* JAXWS_EJB3
* JAXRPC_POJO
* JAXRPC_EJB21
As a consequence, we'll need multiple fixes:
- ContainerMetaDataDeploymentAspect: the endpoint type needs to be
considered for properly attaching metadata
+1
- EndpointHandlerDeploymentAspect: the endpoint type is to be used
for
deciding which invocation handler to set in each endpoint
+1
- EndpointAddressDeploymentAspect: this also needs to consider the
endpoint type for figuring out if a confidential/secure transport
address is required
+1
- 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)
IMO both JSEArchiveMetaData & EJBArchiveMetaData will need to split
too.
They contain some information that are endpoint specific.
For example it should be possible to define context root per EJB endpoint
in same deployment. This is what TCK6 does and we're working it around
with some DD customization hacks. Probably as prove of concept we should
allow support for @WebContext on POJOs as well?
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...
--
Richard Opalka
ropalka(a)redhat.com
JBoss, by Red Hat
Mobile: +420 731 186 942