users@grizzly.java.net

Re: Questions regarding adding new GrizzlyAdapter

From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
Date: Fri, 27 Mar 2009 09:05:22 +0100

Salut,

Jerome Dochez wrote:
>
> On Mar 26, 2009, at 3:11 PM, Bhakti Mehta wrote:
>
>> Hi all,
>> I am trying to follow
>> http://weblogs.java.net/blog/jfarcand/archive/2009/03/glassfish_v3_ex.html
>>
>> and http://blogs.sun.com/dochez/
>>
>> I have an EjbWebserviceServlet which is registered to dispatch
>> requests for ejb endpoints.
>>
>> If I have to implement a grizzly adapter I can have
>> EjbWebserviceAdapter extending GrizzlyAdapter
>> Then the service method of my adapter can do whatever I was doing in
>> EjbWebserviceServlet.
>> Questions.
>>
>> 1.What is the relation between HttpRequest/Response and
>> GrizzlyRequest/Response? I assume you must be parsing an
>> HttpRequest/Response and populating the GrizzlyRequest/Response right?
>>
> Jean Francois, can you help bahkti on this one...

In GlassFish, HttpRequest/Response are just wrapper around Grizzly
Request/Response. So the Request and the Response contains the same
information you would normally get when using the Servlet API.

Can you send/link your EjbWebServiceServlet code? I would like to look
at it as you may want to take a look at the ServletAdapter and see if
you can run th Servlet directly from that class. If that can help your
work then we can decide if we want to integrate that Grizzly module in
v3. Note that the Grizzly Servlet Container is not 100% tck happy
(missing features like error pages mechanism and request dispatcher),
but still used a lot -> Jersey runs on top of it.


>
>> 2.I saw in both yours and Jerome's blogs that adapters can be
>> registered by adding an adapter element in the xml file with context
>> root.
>> Then the file is in META-INF/lib of the jar which is deployed.
>> How would I handle this in v3 at deploment time. Say I see an ejb
>> endpoint and I want to map its context root to my
>> EjbWebserviceAdapter. Can I do this programmatically
> yes look at the RequestDispatcher contract in glassfish-api.
>
>>
>> 3. Please can you give some advice on how would this work. Say I
>> deploy the ear file with webservices. Then there is someway I register
>> that this endpoint is mapped to my Adapter. Where would this
>> registration happen.
> in the start() of your ApplicationContainer.
>
>> Previously we used to register the EjbWebServiceServlet in
>> WebContainer but I have observed that if I deploy a ear file the
>> WebContainer never gets a chance to startup so I was asked to
>> implement this adapter by Jerome.

Agree with Jerome :-)

A+

-- Jeanfrancois



>>
>>
>> Thank a lot,
>> Bhakti
>>
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>