dev@glassfish.java.net

Re: Undeterministic ordering of Deployers load metadata causes issues.

From: Bhakti Mehta <Bhakti.Mehta_at_Sun.COM>
Date: Thu, 30 Apr 2009 09:43:17 -0700

Thanks Jerome. I will try out these changes.
Are you thinking of having 1 WebservicesSniffer which sniffs for
webservices based annotations and webservices.xml
and then there would be 2 containers one for EjbWebservices and one for
web based Webservices.
Then there would be 2 deployers again one for each
I am not sure if that will work so need your advice.
Please let me know.
Thanks,
Bhakti


Jerome Dochez wrote:
> answered too fast, seems like the WebDeployer is not doing the right
> thing either so I also need to modify it.
> once this is done, what I describe below will work...
>
> jerome
>
> On Apr 30, 2009, at 9:19 AM, Jerome Dochez wrote:
>
>> well if you want to have the webservices deployer ran after the web
>> deployer then you must declare that dependency, today you just have
>>
>> @Override
>> public MetaData getMetaData() {
>> return new MetaData(false, null, new Class[]
>> {Application.class});
>> }
>>
>> you should have
>>
>> @Override
>> public MetaData getMetaData() {
>> return new MetaData(false, null, new Class[]
>> {WebBundleDescriptor.class});
>> }
>> (application dependency comes for free at that point...)
>>
>> This would not work if you deploy an ejb module however so you may
>> have to separate the WebServicesDeployer in 2 classes, one for Web,
>> one for EJB. Some subclassing with a common superclass should help here.
>>
>> jerome
>>
>>
>> On Apr 29, 2009, at 3:35 PM, Bhakti Mehta wrote:
>>
>>> Hi,
>>> I see this error if ApplicationLifeCycle calls
>>> WebservicesDeployer's loadMetaData before WebDeployers loadMetaData
>>> in that case WebBundleDescriptor's getContextRoot (line 227) returns ""
>>> This causes an error in our address computation where the webservice
>>> is deployed
>>>
>>> This is sometimes harder to reproduce. But I have found this works
>>> most of the times
>>> deploy WS3.war it may show (I use autodeploy) in server log
>>> Webservice Endpoint deployed
>>> Hello listening at address at
>>> http://localhost:8080/WS3/HelloService at first attempt
>>>
>>> Now undeploy WS3.war (asadmin undeploy WS3)
>>>
>>> Now redeploy (again autodeploy)
>>> Set breakpoint at WebBundleDescriptor.getContextRoot line 227 the
>>> contextRoot is ""
>>>
>>> Also then you will see if the WebServiceDeployer came before
>>> WebDeployer the server log
>>> shows
>>> Webservice Endpoint deployed
>>> Hello listening at address at http://localhost:8080//HelloService
>>> (notice no WS3?)
>>>
>>> Attaching the stacktrace if needed. Please let me know if you need
>>> more information.
>>> Regards,
>>> Bhakti
>>>
>>> <WS3.war><Picture
>>> 1.png>---------------------------------------------------------------------
>>>
>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>
>