users@grizzly.java.net

Follow up on ServletAdapter

From: Bhakti Mehta <Bhakti.Mehta_at_Sun.COM>
Date: Wed, 01 Apr 2009 09:26:52 -0700

Hi,
I did some experiments yesterday in a branch so wanted some feedback
from you folks

I use dispatcher to register the servlet adapter with the context root
as shown here. This is done whenever the StatelessSessionContainer calls
the WebservicesEjbEndpointRegistery to register an ejb endpoint
https://glassfish-svn.dev.java.net/source/browse/glassfish-svn/branches/bhakti/webservices/jsr109-impl/src/main/java/org/glassfish/webservices/WebServiceEjbEndpointRegistry.java?view=diff&rev=25777&p1=branches/bhakti/webservices/jsr109-impl/src/main/java/org/glassfish/webservices/WebServiceEjbEndpointRegistry.java&p2=branches/bhakti/webservices/jsr109-impl/src/main/java/org/glassfish/webservices/WebServiceEjbEndpointRegistry.java&r1=25776&r2=25777


This is the code for my ServletAdapter
https://glassfish-svn.dev.java.net/source/browse/glassfish-svn/branches/bhakti/webservices/jsr109-impl/src/main/java/org/glassfish/webservices/EjbWebServiceAdapter.java?view=auto&rev=25777

I could see the service method invoked of the EjbWebservicesAdapter, so
far so good.

I had 2 questions
1. The GrizzlyWebserver should be started earlier and just once and
stopped at the end. I keep getting Address 8080 already in used if I
start and stop at the WebservicesEjbEndpointRegistry level every time I
register and unregister an ejb endpoint (I even tried in static
initializer but ran into errors and do not think that is right)


2.If I have a servletInstance set on ServletAdapter when does it's
service method be invoked ? Maybe I missed it I could not figure that.

3.From the ServletAdapter if I want to get the ServletContext how do I
get that.

Please let me know Sorry if these are very obvious

Thanks,
Bhakti