[jboss-dev] metadata not attached to DeploymentUnit

Adrian abrock at redhat.com
Fri Oct 12 09:59:04 EDT 2007


To me this is the wrong approach anyway.

There shouldn't be any code that does

if (ejbdeployment)
  doThis();
else if (webdeployment)
  doThat();
else if (unknowntype) // OOPS (pun intended ;-)
  cantDoIt();

The webservice deployers should be working off some generic
metadata that triggers them to operate.

Then each type of deployment can populate that metadata
to say "I want a webservice endpoint for this".

This is a seperate deployer for each type we know how
to map to a webservice it takes the ejb/web/other
metadata and maps or bridges it to the webservice
metadata.

It shouldn't just be restricted to ejbs and wars.

e.g. An MBean should be capable of being an endpoint if
there is a deployer that creates the relevant
metadata attachment from say a META-INF/jboss-webservice.xml in the sar.

The security deployers take the same brain dead
(non object orientated) approach.

On Fri, 2007-10-12 at 15:32 +0200, Carlo de Wolf wrote:
> This might be because the JBossWebMetaData isn't specified as an
> optional input for that deployer. Which deployer are you talking about?
> 
> Carlo
> 
> On Fri, 2007-10-12 at 14:41 +0200, Thomas Diesler wrote:
> > Hi Scott,
> > 
> > we used to be able to detect a webapp deployment like this. Later, we
> > inspect the meta data for WS relevant servlet classes.
> > 
> > After the recent change to the new metadata model, the attachment is
> > missing. Is this work in progress (i.e. will the attachment be there
> > again) or should we do things differently?
> > 
> >    public boolean isWebServiceDeployment(DeploymentUnit unit)
> >    {
> >       if (unit.getAttachment(JBossWebMetaData.class) == null)
> >          return false;
> > 
> >       return true;
> >    }
> > 
> > cheers
> > -thomas
> > 
> 
> _______________________________________________
> jboss-development mailing list
> jboss-development at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jboss-development
-- 
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Adrian Brock
Chief Scientist
JBoss, a division of Red Hat
xxxxxxxxxxxxxxxxxxxxxxxxxxxx




More information about the jboss-development mailing list