dev@glassfish.java.net

Re: sniffers used to load an app?

From: Hong Zhang <Hong.Zhang_at_Sun.COM>
Date: Mon, 23 Jun 2008 22:15:29 -0400

Bhakti Mehta wrote:

> Peter,
> Pls see inline
>
> Peter Williams wrote:
>
>> Sorry, I was on vacation last week, so wasn't able to reply.
>>
>> Bhakti Mehta wrote:
>>
>>>
>>> >So I need more information. What are you going to do for ejb jars
>>> that contain web services? Will the ejb sniffer also be taken over
>>> like this? We will have an EjbWebServicesSniffer though I have not
>>> worked on it much as need to discuss more with Mahesh about this.
>>
>> Any more information on this? I would really like to know how this
>> will be handled (or rather, how it will appear in domain.xml for
>> deployed applications).Also, what happens if a jruby app tries to use
>> metro?
>
> I have not gotten a chance to discuss this further so will get back to
> you on this one.
> The Jruby case is an interesting one.I doubt we may be handling it
> properly and again will need to do more investigation here. Incase
> you have tried that let me know what you find.
>
>>> >What about other candidate modules for web services using metro?
>>> I do not think any other sniffers will be there from our end
>>> atleast. We should be the ones looking at webservices and doing the
>>> needed tasks .
>>>
>>>>
>>>> Is it safe to say that any add-on module for glassfish v3 can take
>>>> over the responsibilities of a core sniffer such as web and
>>>> eliminate it's visibility like this?
>>>
>>> I dont think the app cares which deployer is deploying it as long as
>>> the deployer can handle it , also I dont think we are hijacking the
>>> WebDeployer infact that is the one doing the actual work,maybe
>>> Jerome can add more here
>>
>> I don't follow your logic here. <web> deployer is removed and
>> replaced with <webservices>, as far as domain.xml is concerned. So
>> from my perspective you are definitely hijacking web deployer. I
>> assume your code is following some sort of delegation scheme under
>> the hood since obviously the webs work.
>
> I mentioned in the other thread to Kedar where I was looking through
> the domain.xml I see the following lines for all the 3 different cases
> of apps I deployed, atleast from there I found it impossible to figure
> which sniffer/deployer did the job?
> <engine sniffer="web" />
> <engine sniffer="webservices" />
> <engine sniffer="security" />
>
So were both web and webservices sniffers triggered as part of the
deployment here? If yes, then the domain.xml has the correct entries.
However, for a particular sniffer type to be displayed as part of the
list-applications/list-components output, the Sniffer.isUserVisible API
needs to return true. If the WebServicesSniffer return true for this
API, the list-application will say something like:
foo <web> <webservices>

- Hong

> As you mentioned we are delegating from WebServicesDeployer to
> WebDeployer based on versions of spec in WebBundleDescriptor and
> presence or absence of webservices?
> If there is a problem with this approach maybe we can do the check
> somewhere in ApplicationLifecycle so WebservicesSniffer/Deployer
> should not be initiated unless there is a 109 based deployment ? I am
> interested in hearing thoughts from others?
> Where did you see web got replaced with webservices in domain.xml
> (Just curious to know).
> Regards,
> Bhakti
>
>
>>
>> I may have to find a new solution to my problem (how to identify an
>> application in domain.xml).
>>
>> -Peter
>>
>>> Regards,
>>> Bhakti
>>>
>>>>
>>>>
>>>> Bhakti Mehta wrote:
>>>>
>>>>> Yes this is expected behaviour.
>>>>> When you download metro the WebServicessniffer also will sniff the
>>>>> war files.
>>>>> Is an application has a webapp version less than 2.5 in web.xml
>>>>> we delegate the deployment to the WebDeployer . Only if the
>>>>> version is greater than 2.5,109 deployment will kick in and look
>>>>> for webservices.
>>>>> So the underlying behaviour is still the same in your case even
>>>>> after you downloaded metro and it should just work for you.
>>>>> Regards,
>>>>> Bhakti
>>>>>
>>>>>
>>>>> Peter Williams wrote:
>>>>>
>>>>>> If I download TP2 and deploy a simple web (single JSP page), the
>>>>>> sniffers in domain.xml for the app will be <web> and <security>.
>>>>>>
>>>>>> If I then use update center to add Metro, undeploy and redeploy
>>>>>> the app, the sniffers for the app become <webservices> and
>>>>>> <security>.
>>>>>>
>>>>>> Is this expected? Where did <web> go? Why is <webservices>
>>>>>> being used to load an app that doesn't use any web services?
>>>>>>
>>>>>> Most importantly, how can I tell in the second case that the
>>>>>> application is a web application?
>>>>>>
>>>>>> -Peter
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>>
>>>>>> 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
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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
>