You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by David Jencks <da...@yahoo.com> on 2004/09/01 20:24:07 UTC

Web Services and Portlet deployment

I've been working a bit with portlets recently and as a result 
considering how we can handle deployment of packages with auxiliary 
spec-mandated deployment descriptors using jsr-88.  I find the jsr-88 
spec somewhat sketchy on this and at least the portlet spec doesn't 
mention jsr-88.  The current web services deployment code does not 
appear at first glance to fit well into either jsr-88 deployment or the 
geronimo architecture.

As I understand, web services and portlets both involve deploying a 
standard j2ee package (web or ejb) that have an additional deployment 
descriptor in them (web-service.xml(???) and portlet.xml).

Here's what I  think should happen:

--jsr-88 client tells geronimo to deploy package, as a standard j2ee 
package.
--geronimo deployer sorts it as a standard package and hands it to the 
web or ejb deployer
--web or ejb deployer recognizes the extra deployment descriptor and 
hands it to the web services or portlet deployer
--specialized deployer constructs specialized ejb or servlet containers 
gbeans directly (possibly in cooperation with the normal ejb/web 
deployers) and adds them to the package configuration (again perhaps in 
cooperation with the standard deployers)
--the specialized deployer may need to communicate some extra 
information to some other service.  For example, Jetspeed2 has a 
portlet registry that needs to be informed of newly deployed portlets.  
Ideally this information can be communicated by including it in the 
container gbean (servlet or ejb) and using gbean reference collections 
to notify a registry gbean.  However, some other approach may be 
necessary.

Since the openejb deployer is already constructing container gbeans for 
each ejb, I would not expect that a web service-ejb deployer along 
these lines to require extensive modifications to the openejb deployer. 
  However, our jetty deployer currently relies on jetty to interpret the 
web.xml descriptor and deploy servlets.  This has the additional 
problem that servlets are not represented by gbeans, so they don't fit 
in the jsr-77 framework.  I think the solution here is to extend the 
geronimo-jetty deployer to construct gbeans for each servlet directly 
from the web.xml, and not use the Jetty deployer at all.



Comments?

many thanks,
David Jencks


Re: Web Services and Portlet deployment

Posted by David Jencks <da...@yahoo.com>.
Sure, but right now I don't care about editing the dds.  What I want to 
know is what is supposed to happen when I say "distribute" with a 
package that has say a web services descriptor in it.  Does the 88 spec 
say anything about what is supposed to happen?  As I understand it such 
a package will have to be distributed either as a web module or an ejb 
module, depending on the other dd in it.

Many thanks,
david jencks

On Sep 1, 2004, at 2:26 PM, Aaron Mulder wrote:

> 	As far as JSR-88 goes, it includes a facility for multiple
> standard DDs per module -- I think you identify them by name.  So the
> DDBeans would include DDBeans for all the different standard DDs
> (definitely including web services, and likely including portlets as
> well), and then the server module can provide DConfigBeans matching 
> any or
> all DDBeans, and then all the deployment plan ends up including all the
> server-specific information, whether it corresponds to just one 
> standard
> DD or multiple ones (and whether just one module or multiple modules 
> in an
> EAR).
>
> Aaron
>
> On Wed, 1 Sep 2004, David Jencks wrote:
>> I've been working a bit with portlets recently and as a result
>> considering how we can handle deployment of packages with auxiliary
>> spec-mandated deployment descriptors using jsr-88.  I find the jsr-88
>> spec somewhat sketchy on this and at least the portlet spec doesn't
>> mention jsr-88.  The current web services deployment code does not
>> appear at first glance to fit well into either jsr-88 deployment or 
>> the
>> geronimo architecture.
>>
>> As I understand, web services and portlets both involve deploying a
>> standard j2ee package (web or ejb) that have an additional deployment
>> descriptor in them (web-service.xml(???) and portlet.xml).
>>
>> Here's what I  think should happen:
>>
>> --jsr-88 client tells geronimo to deploy package, as a standard j2ee
>> package.
>> --geronimo deployer sorts it as a standard package and hands it to the
>> web or ejb deployer
>> --web or ejb deployer recognizes the extra deployment descriptor and
>> hands it to the web services or portlet deployer
>> --specialized deployer constructs specialized ejb or servlet 
>> containers
>> gbeans directly (possibly in cooperation with the normal ejb/web
>> deployers) and adds them to the package configuration (again perhaps 
>> in
>> cooperation with the standard deployers)
>> --the specialized deployer may need to communicate some extra
>> information to some other service.  For example, Jetspeed2 has a
>> portlet registry that needs to be informed of newly deployed portlets.
>> Ideally this information can be communicated by including it in the
>> container gbean (servlet or ejb) and using gbean reference collections
>> to notify a registry gbean.  However, some other approach may be
>> necessary.
>>
>> Since the openejb deployer is already constructing container gbeans 
>> for
>> each ejb, I would not expect that a web service-ejb deployer along
>> these lines to require extensive modifications to the openejb 
>> deployer.
>>   However, our jetty deployer currently relies on jetty to interpret 
>> the
>> web.xml descriptor and deploy servlets.  This has the additional
>> problem that servlets are not represented by gbeans, so they don't fit
>> in the jsr-77 framework.  I think the solution here is to extend the
>> geronimo-jetty deployer to construct gbeans for each servlet directly
>> from the web.xml, and not use the Jetty deployer at all.
>>
>>
>>
>> Comments?
>>
>> many thanks,
>> David Jencks
>>
>>
>


Re: Web Services and Portlet deployment

Posted by Aaron Mulder <am...@alumni.princeton.edu>.
	As far as JSR-88 goes, it includes a facility for multiple
standard DDs per module -- I think you identify them by name.  So the
DDBeans would include DDBeans for all the different standard DDs
(definitely including web services, and likely including portlets as
well), and then the server module can provide DConfigBeans matching any or
all DDBeans, and then all the deployment plan ends up including all the
server-specific information, whether it corresponds to just one standard
DD or multiple ones (and whether just one module or multiple modules in an 
EAR).

Aaron

On Wed, 1 Sep 2004, David Jencks wrote:
> I've been working a bit with portlets recently and as a result 
> considering how we can handle deployment of packages with auxiliary 
> spec-mandated deployment descriptors using jsr-88.  I find the jsr-88 
> spec somewhat sketchy on this and at least the portlet spec doesn't 
> mention jsr-88.  The current web services deployment code does not 
> appear at first glance to fit well into either jsr-88 deployment or the 
> geronimo architecture.
> 
> As I understand, web services and portlets both involve deploying a 
> standard j2ee package (web or ejb) that have an additional deployment 
> descriptor in them (web-service.xml(???) and portlet.xml).
> 
> Here's what I  think should happen:
> 
> --jsr-88 client tells geronimo to deploy package, as a standard j2ee 
> package.
> --geronimo deployer sorts it as a standard package and hands it to the 
> web or ejb deployer
> --web or ejb deployer recognizes the extra deployment descriptor and 
> hands it to the web services or portlet deployer
> --specialized deployer constructs specialized ejb or servlet containers 
> gbeans directly (possibly in cooperation with the normal ejb/web 
> deployers) and adds them to the package configuration (again perhaps in 
> cooperation with the standard deployers)
> --the specialized deployer may need to communicate some extra 
> information to some other service.  For example, Jetspeed2 has a 
> portlet registry that needs to be informed of newly deployed portlets.  
> Ideally this information can be communicated by including it in the 
> container gbean (servlet or ejb) and using gbean reference collections 
> to notify a registry gbean.  However, some other approach may be 
> necessary.
> 
> Since the openejb deployer is already constructing container gbeans for 
> each ejb, I would not expect that a web service-ejb deployer along 
> these lines to require extensive modifications to the openejb deployer. 
>   However, our jetty deployer currently relies on jetty to interpret the 
> web.xml descriptor and deploy servlets.  This has the additional 
> problem that servlets are not represented by gbeans, so they don't fit 
> in the jsr-77 framework.  I think the solution here is to extend the 
> geronimo-jetty deployer to construct gbeans for each servlet directly 
> from the web.xml, and not use the Jetty deployer at all.
> 
> 
> 
> Comments?
> 
> many thanks,
> David Jencks
> 
> 

Re: Web Services and Portlet deployment

Posted by Srinath Perera <he...@opensource.lk>.
> Can webservices be unregistered from axis?
yes .. undeploy support in the Axis geronimo module is not written yet. 
it is matter of writing code. (I do not get a chance to look in to those
things due to Axis2 ..) I will implement that shortly.

> I'm not sure I understand exactly what a web service is:-)  We need
> (even without web services or portlets) to have a gbean for each
> servlet.  Therefore axis itself, since it is a servlet, will be
> represented by a gbean.
this is already done .. it is load as a jetty cotiner as a web application.
problem is gain access to the Axis Admin API since jetty know it as a
servlet only. we had to use some Static things (I do not like it much
..but  the classloaing inside Axis use atatic things too ...)

> For web services that talk to ejbs, we can either use the standard
> openejb container gbean or if necessary write and extension gbean.

yes right now they use "standard openejb container gbean" though the
ContainerIndex. it work well for Simple Types. there was a security
manager issue loading the complex type class when I go though the
ContainerIndex. I will check it agien and  report to dev list.

> I don't understand yet about web services that talk to POJOs.  Is each
> POJO wrapped in an individual servlet?  Or does axis handle all of
> these itself without interaction with the rest of the j2ee framework?

Axis is a servlet. It convert parameters in SOAP(XML)->java objects. then
it call the impl with parameters. Impl is a POJO/EJB.  if it is POJO axis
simply load the class, create instance and call it. if it is EJB axis call
it though ContinerIndex (inside OpnEJB)/or Remote Interface. What ever
results will convert to SOAP(XML) and send back.

So As far as POJO is concerned "axis handle all of these itself without
interaction with the rest of the j2ee framework"

Thanks
Srinath





Re: Web Services and Portlet deployment

Posted by David Jencks <da...@yahoo.com>.
On Sep 1, 2004, at 8:21 PM, Srinath Perera wrote:

>> The current web services deployment code does not
>> appear at first glance to fit well into either jsr-88 deployment or 
>> the
>> geronimo architecture.
> yap for the time been it is a hack. I was worried about getting it
> working. I talk with the Dims there is bit of clean up to done. I am
> explaining what happen at the WS deployment with should happen list?
>>
>> Here's what I  think should happen:
>>
>> --jsr-88 client tells geronimo to deploy package, as a standard j2ee
>> package.
>> --geronimo deployer sorts it as a standard package and hands it to the
>> web or ejb deployer
>> --web or ejb deployer recognizes the extra deployment descriptor and
>> hands it to the web services or portlet deployer
>
> if it is ws deployer
> * deployer generate a ejb and a wrapper to accpet the income SOAP and 
> call
> the ejb/POJO.
> * if there a EJB it is deployed and started in the openejb
> * Axis do not directly support start/stop each web services.So the
> webservice is registerd inside the Axis ..

Can webservices be unregistered from axis?

> * But there is no GBean for each Web servicehaving a GBean for eah WS
> would be nicer. But Axis is just a Servlet as far as the J2EE 
> Continaer's
> point of view. So am not sure how to expose a Admin interface to the 
> J2EE
> continer so that GBeans can use them. (any sugesstions are welcome)

I'm not sure I understand exactly what a web service is:-)  We need 
(even without web services or portlets) to have a gbean for each 
servlet.  Therefore axis itself, since it is a servlet, will be 
represented by a gbean.  If necessary we can add more gbeans to serve 
as a registry.

For web services that talk to ejbs, we can either use the standard 
openejb container gbean or if necessary write and extension gbean.

I don't understand yet about web services that talk to POJOs.  Is each 
POJO wrapped in an individual servlet?  Or does axis handle all of 
these itself without interaction with the rest of the j2ee framework?

I need to read the web services spec:-)

many thanks
david jencks

> * if we get that GBean for each WS working then when they refer EJB's 
> we
> can make ejb GBean put there as a WS GBean as a dependancy
> thoughts
> Thanks
> Srinath
>


Re: Web Services and Portlet deployment

Posted by Srinath Perera <he...@opensource.lk>.
> The current web services deployment code does not
> appear at first glance to fit well into either jsr-88 deployment or the
> geronimo architecture.
yap for the time been it is a hack. I was worried about getting it
working. I talk with the Dims there is bit of clean up to done. I am
explaining what happen at the WS deployment with should happen list?
>
> Here's what I  think should happen:
>
> --jsr-88 client tells geronimo to deploy package, as a standard j2ee
> package.
> --geronimo deployer sorts it as a standard package and hands it to the
> web or ejb deployer
> --web or ejb deployer recognizes the extra deployment descriptor and
> hands it to the web services or portlet deployer

if it is ws deployer
* deployer generate a ejb and a wrapper to accpet the income SOAP and call
the ejb/POJO.
* if there a EJB it is deployed and started in the openejb
* Axis do not directly support start/stop each web services.So the
webservice is registerd inside the Axis ..
* But there is no GBean for each Web servicehaving a GBean for eah WS
would be nicer. But Axis is just a Servlet as far as the J2EE Continaer's
point of view. So am not sure how to expose a Admin interface to the J2EE
continer so that GBeans can use them. (any sugesstions are welcome)
* if we get that GBean for each WS working then when they refer EJB's we
can make ejb GBean put there as a WS GBean as a dependancy
thoughts
Thanks
Srinath