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 Blevins <da...@visi.com> on 2004/10/29 07:23:23 UTC
Axis module review
Hi All,
I was just reviewing the code in the Axis module and noticed some
things that are considered no-nos or bad practice with the Geronimo
architecture. This is our fault for not reviewing the code sooner.
Let me try and make up for this lack of feedback.
The code as it is now won't run with any of the existing
configurations as it assumes it has kernel-level control over the
server. This could be cleared up by implementing the following
things:
-- Remove all references to Kernel
-- Remove reference to MBeanServer
-- Remove all hard-coded object names
There are a couple places in Geronimo that user kernel references, but
this sort of thing is done as a last resort as it fundamentally breaks
the Geronimo IoC architecture. We know where they are and feel dirty
about them.
Usage of MBeanServer is strictly forbidden. This looks easy to clean
up as the one reference in the code doesn't appear to be used
anywhere.
Hard coding object names is also forbidden. The result of hard coding
the object names is that an expected configurations is frozen in the
code and removes the ability to use plans to configure a Geronimo
system and the layout of the GBeans it that system.
Hope this helps get the module working.
-David
Re: Axis module review
Posted by Srinath Perera <he...@gmail.com>.
Hi all;
I have added few thought about the Axis Gronimo Module to the wiki.
http://wiki.apache.org/geronimo/WSStack
thought ?
Thanks
Srinath
On Thu, 4 Nov 2004 12:27:12 +0600, Srinath Perera <he...@gmail.com> wrote:
> Thanks David :) I am listing what might helpful for you to review.
> (no hurry ..... even I like to have about two weeks time to get the
> real thing started).
>
> 1) new code has removed alll the hardcoded obj names.
> 2)At the test cases I do manually initaite the GBeans that would
> started by the plan in real case.
> 3) I think I got the basic of the plans. It is XML file explans the
> set of GBeans and there referances..... . If I need GBean A referd by
> GBean B I should specify poth GBeans at the plan and put a referance
> in B to A's obj name. then the B will get a refrance to A.
> 4) WSConFig Builder .. (it does not implement the interface properly
> yet) build a GBean (s) for the WS, Store the GBeans in a confguration
> and write the configuration to a store. Using the URI return anyone
> can load the configuration.
> 5) I am not sure How the Axis GBean should find the deployed
> Configurations. I look at the referance patterns but do not get the
> real hang on it yet.
> Cheers
> Srinath
>
>
>
>
> On Wed, 3 Nov 2004 20:50:39 -0800, David Jencks <dj...@gluecode.com> wrote:
> > I am looking forward to looking at the new code very much and hope that
> > I can quickly finish up what I've been working on so I can concentrate
> > on the new code properly.
> >
> > Many thanks,
> >
> > david jencks
> >
> >
> >
> > On Nov 3, 2004, at 8:39 PM, Srinath Perera wrote:
> >
> > > Hi All;
> > >
> > > As I promise I have send a patch that fix the basic problems
> > > (hardcoded obj names ..ect ) in the Axis geronimo module and get the
> > > POJO case up and runing :).
> > >
> > > The patch is checked in; I am looking foward to the comments to know
> > > am I heading in the right direction. (I am busy with a exam and might
> > > not write codes for about two weeks on the module.) but I will be
> > > online and will happy if I can communicate in the mean time and
> > > understand the expectation of the EWS from the Geronimo point of view
> > > throughly.
> > >
> > > Thanks
> > > Srinath
> > >
> > >
> > >
> > > On Fri, 29 Oct 2004 15:17:14 +0600, Srinath Perera
> > > <he...@gmail.com> wrote:
> > >> Thanks everybody for the help :) :)... I think I got the big picure
> > >> and hopfully should be able to get the Web Services working(which do
> > >> not have EJB) behind them with out kernel. (There is a classloader
> > >> issue when the EJB involved. I will try to get the code up removing
> > >> all referances to kernel for POJO based WS.)
> > >>
> > >> I think over all the stuff over the weekend get back. My view about
> > >> the Web Service is follows. There are two types of web services
> > >> A) EJB based
> > >> B) POJO based (servlet based one .. actually both has a servlet at the
> > >> front so I dont see any sense in the name "Servlet based" : ) )
> > >>
> > >> Web Service(HTTP one we concern about) is a Servlet that accepts SOAP
> > >> over HTTP. Axis basically
> > >> 1) get the request XML (SOAP) and converts them to the java objects
> > >> 2) call the java class (POJO) or EJB that provide the implementation
> > >> 3) get what ever the result and send them back as SOAP
> > >>
> > >> Only deferance between the EJB based and POJO based one is
> > >> 1) Axis call a EJB instead of POJO at step #2
> > >> 2) We have to make sure EJB is up when the webservice is called
> > >>
> > >> I think we should be able to do it with one WSBuilder. To be the steps
> > >> is like follows
> > >> 1. Geronimo Deployer find that the WAR/EAR is a ws module by looking
> > >> at exsistance of the webservices.xml file in the module
> > >> 2. The WSBuilder will create the confiuration and start it
> > >> a. there should be a one GBean for each WS (we have to sort out
> > >> how to do this)
> > >> b. there should be a GBean for each EJB that referanced
> > >> 3. when the confiuration started web services are avalible
> > >>
> > >> AxisGBean will keep track of the things and manage Axis
> > >>
> > >> Thanks
> > >> Srinath
> > >>
> > >>
> > >>
> > >>
> > >> On Fri, 29 Oct 2004 01:24:19 -0700, David Blevins
> > >> <db...@gluecode.com> wrote:
> > >>>
> > >>> On Oct 28, 2004, at 11:52 PM, David Jencks wrote:
> > >>>
> > >>>> My understanding of web services is that messages can be sent to
> > >>>> either servlets or ejbs. (Apparently the servlets aren't "Servlet"
> > >>>> implementations, but are usually wrapped in one). We need a gbean
> > >>>> to
> > >>>> be deployed for each such servlet and each such ejb. At the moment
> > >>>> I
> > >>>> think the best approach is to have a WSServletBuilder and a
> > >>>> WSEJBBuilder that will actually build the gbeans. These, especially
> > >>>> the WSEJBBuilder, would be similar to the openejb
> > >>>> SessionConfigBuilder.
> > >>>
> > >>> Not just similar to but the same as--one session bean can have all of
> > >>> the following interfaces:
> > >>> - Local
> > >>> - Remote
> > >>> - ServiceEndpoint
> > >>>
> > >>> All of which can have transaction attributes associated with them.
> > >>> The
> > >>> ServiceEndpoint interface can even be invoked directly by EJBs,
> > >>> Servlets, or App Clients through declaring it as a service-ref and
> > >>> looking a it up through JNDI. Any invocations on the ServiceEndpoint
> > >>> interface go through JAX-RPC.
> > >>>
> > >>> Aside from JAX-RPC/ServiceEndpoint invocations, people can invoke the
> > >>> session bean through SOAP/WSDL over HTTP or HTTPS. In this case
> > >>> there
> > >>> is a mapping from WSDL to the ServiceEndpoint interface.
> > >>>
> > >>> All in all, this is not very different from the CORBA integration
> > >>> which
> > >>> also supports Java and non-Java clients through IIOP. In this case
> > >>> we
> > >>> use SOAP instead of IIOP, ServiceEndpoint/JAX-RPC instead of
> > >>> Remote/RMI-IIOP, WSDL-to-Java mapping instead of IDL-to-Java mapping,
> > >>> and Axis instead of an ORB.
> > >>>
> > >>> -David
> > >>>
> > >>>
> > >>
> > >
> >
> >
>
Re: Axis module review
Posted by Srinath Perera <he...@gmail.com>.
Thanks David :) I am listing what might helpful for you to review.
(no hurry ..... even I like to have about two weeks time to get the
real thing started).
1) new code has removed alll the hardcoded obj names.
2)At the test cases I do manually initaite the GBeans that would
started by the plan in real case.
3) I think I got the basic of the plans. It is XML file explans the
set of GBeans and there referances..... . If I need GBean A referd by
GBean B I should specify poth GBeans at the plan and put a referance
in B to A's obj name. then the B will get a refrance to A.
4) WSConFig Builder .. (it does not implement the interface properly
yet) build a GBean (s) for the WS, Store the GBeans in a confguration
and write the configuration to a store. Using the URI return anyone
can load the configuration.
5) I am not sure How the Axis GBean should find the deployed
Configurations. I look at the referance patterns but do not get the
real hang on it yet.
Cheers
Srinath
On Wed, 3 Nov 2004 20:50:39 -0800, David Jencks <dj...@gluecode.com> wrote:
> I am looking forward to looking at the new code very much and hope that
> I can quickly finish up what I've been working on so I can concentrate
> on the new code properly.
>
> Many thanks,
>
> david jencks
>
>
>
> On Nov 3, 2004, at 8:39 PM, Srinath Perera wrote:
>
> > Hi All;
> >
> > As I promise I have send a patch that fix the basic problems
> > (hardcoded obj names ..ect ) in the Axis geronimo module and get the
> > POJO case up and runing :).
> >
> > The patch is checked in; I am looking foward to the comments to know
> > am I heading in the right direction. (I am busy with a exam and might
> > not write codes for about two weeks on the module.) but I will be
> > online and will happy if I can communicate in the mean time and
> > understand the expectation of the EWS from the Geronimo point of view
> > throughly.
> >
> > Thanks
> > Srinath
> >
> >
> >
> > On Fri, 29 Oct 2004 15:17:14 +0600, Srinath Perera
> > <he...@gmail.com> wrote:
> >> Thanks everybody for the help :) :)... I think I got the big picure
> >> and hopfully should be able to get the Web Services working(which do
> >> not have EJB) behind them with out kernel. (There is a classloader
> >> issue when the EJB involved. I will try to get the code up removing
> >> all referances to kernel for POJO based WS.)
> >>
> >> I think over all the stuff over the weekend get back. My view about
> >> the Web Service is follows. There are two types of web services
> >> A) EJB based
> >> B) POJO based (servlet based one .. actually both has a servlet at the
> >> front so I dont see any sense in the name "Servlet based" : ) )
> >>
> >> Web Service(HTTP one we concern about) is a Servlet that accepts SOAP
> >> over HTTP. Axis basically
> >> 1) get the request XML (SOAP) and converts them to the java objects
> >> 2) call the java class (POJO) or EJB that provide the implementation
> >> 3) get what ever the result and send them back as SOAP
> >>
> >> Only deferance between the EJB based and POJO based one is
> >> 1) Axis call a EJB instead of POJO at step #2
> >> 2) We have to make sure EJB is up when the webservice is called
> >>
> >> I think we should be able to do it with one WSBuilder. To be the steps
> >> is like follows
> >> 1. Geronimo Deployer find that the WAR/EAR is a ws module by looking
> >> at exsistance of the webservices.xml file in the module
> >> 2. The WSBuilder will create the confiuration and start it
> >> a. there should be a one GBean for each WS (we have to sort out
> >> how to do this)
> >> b. there should be a GBean for each EJB that referanced
> >> 3. when the confiuration started web services are avalible
> >>
> >> AxisGBean will keep track of the things and manage Axis
> >>
> >> Thanks
> >> Srinath
> >>
> >>
> >>
> >>
> >> On Fri, 29 Oct 2004 01:24:19 -0700, David Blevins
> >> <db...@gluecode.com> wrote:
> >>>
> >>> On Oct 28, 2004, at 11:52 PM, David Jencks wrote:
> >>>
> >>>> My understanding of web services is that messages can be sent to
> >>>> either servlets or ejbs. (Apparently the servlets aren't "Servlet"
> >>>> implementations, but are usually wrapped in one). We need a gbean
> >>>> to
> >>>> be deployed for each such servlet and each such ejb. At the moment
> >>>> I
> >>>> think the best approach is to have a WSServletBuilder and a
> >>>> WSEJBBuilder that will actually build the gbeans. These, especially
> >>>> the WSEJBBuilder, would be similar to the openejb
> >>>> SessionConfigBuilder.
> >>>
> >>> Not just similar to but the same as--one session bean can have all of
> >>> the following interfaces:
> >>> - Local
> >>> - Remote
> >>> - ServiceEndpoint
> >>>
> >>> All of which can have transaction attributes associated with them.
> >>> The
> >>> ServiceEndpoint interface can even be invoked directly by EJBs,
> >>> Servlets, or App Clients through declaring it as a service-ref and
> >>> looking a it up through JNDI. Any invocations on the ServiceEndpoint
> >>> interface go through JAX-RPC.
> >>>
> >>> Aside from JAX-RPC/ServiceEndpoint invocations, people can invoke the
> >>> session bean through SOAP/WSDL over HTTP or HTTPS. In this case
> >>> there
> >>> is a mapping from WSDL to the ServiceEndpoint interface.
> >>>
> >>> All in all, this is not very different from the CORBA integration
> >>> which
> >>> also supports Java and non-Java clients through IIOP. In this case
> >>> we
> >>> use SOAP instead of IIOP, ServiceEndpoint/JAX-RPC instead of
> >>> Remote/RMI-IIOP, WSDL-to-Java mapping instead of IDL-to-Java mapping,
> >>> and Axis instead of an ORB.
> >>>
> >>> -David
> >>>
> >>>
> >>
> >
>
>
Re: Axis module review
Posted by David Jencks <dj...@gluecode.com>.
I am looking forward to looking at the new code very much and hope that
I can quickly finish up what I've been working on so I can concentrate
on the new code properly.
Many thanks,
david jencks
On Nov 3, 2004, at 8:39 PM, Srinath Perera wrote:
> Hi All;
>
> As I promise I have send a patch that fix the basic problems
> (hardcoded obj names ..ect ) in the Axis geronimo module and get the
> POJO case up and runing :).
>
> The patch is checked in; I am looking foward to the comments to know
> am I heading in the right direction. (I am busy with a exam and might
> not write codes for about two weeks on the module.) but I will be
> online and will happy if I can communicate in the mean time and
> understand the expectation of the EWS from the Geronimo point of view
> throughly.
>
> Thanks
> Srinath
>
>
>
> On Fri, 29 Oct 2004 15:17:14 +0600, Srinath Perera
> <he...@gmail.com> wrote:
>> Thanks everybody for the help :) :)... I think I got the big picure
>> and hopfully should be able to get the Web Services working(which do
>> not have EJB) behind them with out kernel. (There is a classloader
>> issue when the EJB involved. I will try to get the code up removing
>> all referances to kernel for POJO based WS.)
>>
>> I think over all the stuff over the weekend get back. My view about
>> the Web Service is follows. There are two types of web services
>> A) EJB based
>> B) POJO based (servlet based one .. actually both has a servlet at the
>> front so I dont see any sense in the name "Servlet based" : ) )
>>
>> Web Service(HTTP one we concern about) is a Servlet that accepts SOAP
>> over HTTP. Axis basically
>> 1) get the request XML (SOAP) and converts them to the java objects
>> 2) call the java class (POJO) or EJB that provide the implementation
>> 3) get what ever the result and send them back as SOAP
>>
>> Only deferance between the EJB based and POJO based one is
>> 1) Axis call a EJB instead of POJO at step #2
>> 2) We have to make sure EJB is up when the webservice is called
>>
>> I think we should be able to do it with one WSBuilder. To be the steps
>> is like follows
>> 1. Geronimo Deployer find that the WAR/EAR is a ws module by looking
>> at exsistance of the webservices.xml file in the module
>> 2. The WSBuilder will create the confiuration and start it
>> a. there should be a one GBean for each WS (we have to sort out
>> how to do this)
>> b. there should be a GBean for each EJB that referanced
>> 3. when the confiuration started web services are avalible
>>
>> AxisGBean will keep track of the things and manage Axis
>>
>> Thanks
>> Srinath
>>
>>
>>
>>
>> On Fri, 29 Oct 2004 01:24:19 -0700, David Blevins
>> <db...@gluecode.com> wrote:
>>>
>>> On Oct 28, 2004, at 11:52 PM, David Jencks wrote:
>>>
>>>> My understanding of web services is that messages can be sent to
>>>> either servlets or ejbs. (Apparently the servlets aren't "Servlet"
>>>> implementations, but are usually wrapped in one). We need a gbean
>>>> to
>>>> be deployed for each such servlet and each such ejb. At the moment
>>>> I
>>>> think the best approach is to have a WSServletBuilder and a
>>>> WSEJBBuilder that will actually build the gbeans. These, especially
>>>> the WSEJBBuilder, would be similar to the openejb
>>>> SessionConfigBuilder.
>>>
>>> Not just similar to but the same as--one session bean can have all of
>>> the following interfaces:
>>> - Local
>>> - Remote
>>> - ServiceEndpoint
>>>
>>> All of which can have transaction attributes associated with them.
>>> The
>>> ServiceEndpoint interface can even be invoked directly by EJBs,
>>> Servlets, or App Clients through declaring it as a service-ref and
>>> looking a it up through JNDI. Any invocations on the ServiceEndpoint
>>> interface go through JAX-RPC.
>>>
>>> Aside from JAX-RPC/ServiceEndpoint invocations, people can invoke the
>>> session bean through SOAP/WSDL over HTTP or HTTPS. In this case
>>> there
>>> is a mapping from WSDL to the ServiceEndpoint interface.
>>>
>>> All in all, this is not very different from the CORBA integration
>>> which
>>> also supports Java and non-Java clients through IIOP. In this case
>>> we
>>> use SOAP instead of IIOP, ServiceEndpoint/JAX-RPC instead of
>>> Remote/RMI-IIOP, WSDL-to-Java mapping instead of IDL-to-Java mapping,
>>> and Axis instead of an ORB.
>>>
>>> -David
>>>
>>>
>>
>
Re: Axis module review
Posted by Srinath Perera <he...@gmail.com>.
Hi All;
As I promise I have send a patch that fix the basic problems
(hardcoded obj names ..ect ) in the Axis geronimo module and get the
POJO case up and runing :).
The patch is checked in; I am looking foward to the comments to know
am I heading in the right direction. (I am busy with a exam and might
not write codes for about two weeks on the module.) but I will be
online and will happy if I can communicate in the mean time and
understand the expectation of the EWS from the Geronimo point of view
throughly.
Thanks
Srinath
On Fri, 29 Oct 2004 15:17:14 +0600, Srinath Perera <he...@gmail.com> wrote:
> Thanks everybody for the help :) :)... I think I got the big picure
> and hopfully should be able to get the Web Services working(which do
> not have EJB) behind them with out kernel. (There is a classloader
> issue when the EJB involved. I will try to get the code up removing
> all referances to kernel for POJO based WS.)
>
> I think over all the stuff over the weekend get back. My view about
> the Web Service is follows. There are two types of web services
> A) EJB based
> B) POJO based (servlet based one .. actually both has a servlet at the
> front so I dont see any sense in the name "Servlet based" : ) )
>
> Web Service(HTTP one we concern about) is a Servlet that accepts SOAP
> over HTTP. Axis basically
> 1) get the request XML (SOAP) and converts them to the java objects
> 2) call the java class (POJO) or EJB that provide the implementation
> 3) get what ever the result and send them back as SOAP
>
> Only deferance between the EJB based and POJO based one is
> 1) Axis call a EJB instead of POJO at step #2
> 2) We have to make sure EJB is up when the webservice is called
>
> I think we should be able to do it with one WSBuilder. To be the steps
> is like follows
> 1. Geronimo Deployer find that the WAR/EAR is a ws module by looking
> at exsistance of the webservices.xml file in the module
> 2. The WSBuilder will create the confiuration and start it
> a. there should be a one GBean for each WS (we have to sort out
> how to do this)
> b. there should be a GBean for each EJB that referanced
> 3. when the confiuration started web services are avalible
>
> AxisGBean will keep track of the things and manage Axis
>
> Thanks
> Srinath
>
>
>
>
> On Fri, 29 Oct 2004 01:24:19 -0700, David Blevins <db...@gluecode.com> wrote:
> >
> > On Oct 28, 2004, at 11:52 PM, David Jencks wrote:
> >
> > > My understanding of web services is that messages can be sent to
> > > either servlets or ejbs. (Apparently the servlets aren't "Servlet"
> > > implementations, but are usually wrapped in one). We need a gbean to
> > > be deployed for each such servlet and each such ejb. At the moment I
> > > think the best approach is to have a WSServletBuilder and a
> > > WSEJBBuilder that will actually build the gbeans. These, especially
> > > the WSEJBBuilder, would be similar to the openejb
> > > SessionConfigBuilder.
> >
> > Not just similar to but the same as--one session bean can have all of
> > the following interfaces:
> > - Local
> > - Remote
> > - ServiceEndpoint
> >
> > All of which can have transaction attributes associated with them. The
> > ServiceEndpoint interface can even be invoked directly by EJBs,
> > Servlets, or App Clients through declaring it as a service-ref and
> > looking a it up through JNDI. Any invocations on the ServiceEndpoint
> > interface go through JAX-RPC.
> >
> > Aside from JAX-RPC/ServiceEndpoint invocations, people can invoke the
> > session bean through SOAP/WSDL over HTTP or HTTPS. In this case there
> > is a mapping from WSDL to the ServiceEndpoint interface.
> >
> > All in all, this is not very different from the CORBA integration which
> > also supports Java and non-Java clients through IIOP. In this case we
> > use SOAP instead of IIOP, ServiceEndpoint/JAX-RPC instead of
> > Remote/RMI-IIOP, WSDL-to-Java mapping instead of IDL-to-Java mapping,
> > and Axis instead of an ORB.
> >
> > -David
> >
> >
>
Re: Axis module review
Posted by Srinath Perera <he...@gmail.com>.
Thanks everybody for the help :) :)... I think I got the big picure
and hopfully should be able to get the Web Services working(which do
not have EJB) behind them with out kernel. (There is a classloader
issue when the EJB involved. I will try to get the code up removing
all referances to kernel for POJO based WS.)
I think over all the stuff over the weekend get back. My view about
the Web Service is follows. There are two types of web services
A) EJB based
B) POJO based (servlet based one .. actually both has a servlet at the
front so I dont see any sense in the name "Servlet based" : ) )
Web Service(HTTP one we concern about) is a Servlet that accepts SOAP
over HTTP. Axis basically
1) get the request XML (SOAP) and converts them to the java objects
2) call the java class (POJO) or EJB that provide the implementation
3) get what ever the result and send them back as SOAP
Only deferance between the EJB based and POJO based one is
1) Axis call a EJB instead of POJO at step #2
2) We have to make sure EJB is up when the webservice is called
I think we should be able to do it with one WSBuilder. To be the steps
is like follows
1. Geronimo Deployer find that the WAR/EAR is a ws module by looking
at exsistance of the webservices.xml file in the module
2. The WSBuilder will create the confiuration and start it
a. there should be a one GBean for each WS (we have to sort out
how to do this)
b. there should be a GBean for each EJB that referanced
3. when the confiuration started web services are avalible
AxisGBean will keep track of the things and manage Axis
Thanks
Srinath
On Fri, 29 Oct 2004 01:24:19 -0700, David Blevins <db...@gluecode.com> wrote:
>
> On Oct 28, 2004, at 11:52 PM, David Jencks wrote:
>
> > My understanding of web services is that messages can be sent to
> > either servlets or ejbs. (Apparently the servlets aren't "Servlet"
> > implementations, but are usually wrapped in one). We need a gbean to
> > be deployed for each such servlet and each such ejb. At the moment I
> > think the best approach is to have a WSServletBuilder and a
> > WSEJBBuilder that will actually build the gbeans. These, especially
> > the WSEJBBuilder, would be similar to the openejb
> > SessionConfigBuilder.
>
> Not just similar to but the same as--one session bean can have all of
> the following interfaces:
> - Local
> - Remote
> - ServiceEndpoint
>
> All of which can have transaction attributes associated with them. The
> ServiceEndpoint interface can even be invoked directly by EJBs,
> Servlets, or App Clients through declaring it as a service-ref and
> looking a it up through JNDI. Any invocations on the ServiceEndpoint
> interface go through JAX-RPC.
>
> Aside from JAX-RPC/ServiceEndpoint invocations, people can invoke the
> session bean through SOAP/WSDL over HTTP or HTTPS. In this case there
> is a mapping from WSDL to the ServiceEndpoint interface.
>
> All in all, this is not very different from the CORBA integration which
> also supports Java and non-Java clients through IIOP. In this case we
> use SOAP instead of IIOP, ServiceEndpoint/JAX-RPC instead of
> Remote/RMI-IIOP, WSDL-to-Java mapping instead of IDL-to-Java mapping,
> and Axis instead of an ORB.
>
> -David
>
>
Re: Axis module review
Posted by David Blevins <db...@gluecode.com>.
On Oct 28, 2004, at 11:52 PM, David Jencks wrote:
> My understanding of web services is that messages can be sent to
> either servlets or ejbs. (Apparently the servlets aren't "Servlet"
> implementations, but are usually wrapped in one). We need a gbean to
> be deployed for each such servlet and each such ejb. At the moment I
> think the best approach is to have a WSServletBuilder and a
> WSEJBBuilder that will actually build the gbeans. These, especially
> the WSEJBBuilder, would be similar to the openejb
> SessionConfigBuilder.
Not just similar to but the same as--one session bean can have all of
the following interfaces:
- Local
- Remote
- ServiceEndpoint
All of which can have transaction attributes associated with them. The
ServiceEndpoint interface can even be invoked directly by EJBs,
Servlets, or App Clients through declaring it as a service-ref and
looking a it up through JNDI. Any invocations on the ServiceEndpoint
interface go through JAX-RPC.
Aside from JAX-RPC/ServiceEndpoint invocations, people can invoke the
session bean through SOAP/WSDL over HTTP or HTTPS. In this case there
is a mapping from WSDL to the ServiceEndpoint interface.
All in all, this is not very different from the CORBA integration which
also supports Java and non-Java clients through IIOP. In this case we
use SOAP instead of IIOP, ServiceEndpoint/JAX-RPC instead of
Remote/RMI-IIOP, WSDL-to-Java mapping instead of IDL-to-Java mapping,
and Axis instead of an ORB.
-David
Re: Axis module review
Posted by David Jencks <dj...@gluecode.com>.
First of all, I'm hoping to start looking seriously at web service
deployment soon. I think it will require some fairly fundamental
modifications of how deployment in geronimo is structured. However,
these changes will also allow us to do things like deploy portlets in a
well integrated way. So, you may not be able to do everything you need
to do in geronimo yet:-)
Generally the deployer components don't assume anything in the runtime
system is available or running. The role of a deployer is to a large
extent to construct gbean configurations. The information it needs
should be supplied as gbean attributes or references. For instance, if
you look at the EarConfigBuilder gbean, it has references to various
j2ee module deployers for web, ejb, connector, and client, but the only
knowledge of the runtime server is from object names for the components
that will be needed at runtime. These object names are copied into
many of the "output" gbeans as references.
Both the assembly j2ee-deployer-plan and j2ee-server plan have all the
deployment gbeans in them currently: this is a good place to look to
see how the configuration fits together. The deployer gbeans really
shouldn't be in the server plan, but are there because we unfortunately
included the deployment code in the same module as the runtime code in
the early days of geronimo, and haven't had time to split them into two
modules. The client module is properly divided into runtime and
deployment (client-builder).
My understanding of web services is that messages can be sent to either
servlets or ejbs. (Apparently the servlets aren't "Servlet"
implementations, but are usually wrapped in one). We need a gbean to
be deployed for each such servlet and each such ejb. At the moment I
think the best approach is to have a WSServletBuilder and a
WSEJBBuilder that will actually build the gbeans. These, especially
the WSEJBBuilder, would be similar to the openejb SessionConfigBuilder.
(I don't know what kinds of ejbs can be the target of a WS message:
I'm assuming only stateless session beans. If there are others, they
would need their own builders).
One problem is that currently we are not providing gbeans for normal
web servlets, but are just relying on the Jetty deployer. This will
have to change anyway, but it may be difficult to write a
WEServletBuilder until this is fixed.
At the moment I don't have a good idea about how to determine that a
j2ee module contains web services, and should go to the WS deployer.
Can a single WS module deploy both servlets and ejbs, or would this
require two modules?
I'll try to put some more comments inline.
On Oct 28, 2004, at 10:59 PM, Srinath Perera wrote:
>> I was just reviewing the code in the Axis module and noticed some
>> things that are considered no-nos or bad practice with the Geronimo
>> architecture. This is our fault for not reviewing the code sooner.
>>
>> Let me try and make up for this lack of feedback.
> Thanks David, when I start with the Axis module I want to get the Web
> Service working, and hope things would shape up when the comment come
> as I am great beliver of starting with something runing and shape it
> up.
>
> let us address the things one by one. To put it in simple words I wan
> to do the following
>
> There are three senarios
> 1) Start Axis
> * I need jetty and open ejb running
openejb isn't really a "thing": for the most part each ejb gets
deployed independently. What the WS deployer needs to do is to
construct gbean configurations for WS servlets and WS ejbs and add them
to the configuration it is constructing. Jetty is a bit more of a
"thing", but, if you deploy a web app, it will be registered with Jetty
automatically.
> * I need to start the AxisGBean
I'm assuming this is needed at runtime rather than deployment time.
This should be done by putting an xml configuration for the axis gbean
in j2ee-service.xml. It could also go in a separate plan which might
make it easier to experiment with.
>
> * I need to start Axis Servelt inside jetty
This will eventually be done automatically: all the WS deployer will
have to do is construct the gbean configuration for the axis servlet
instance.
>
>
> 2) deploy a Webservice
> * I need to invoke the deploy(...) in AxisGBean
I don't know what this does
> * Axis GBean register the Web Service in Axis (which is WS detail I
> belive I can handle it)
I think this could be done by having reference collections on the axis
gbean that contain all the ws servlets and ws ejbs. Whenever one of
these components starts, it will be automatically added to the
reference collection, and you can be notified on a listener. The axis
gbean can then register the WS in axis. One example of something like
this is the transactiom manager recovery in TransactionManagerProxy.
(don't worry about the recovery part, it's just an example of how to
use the reference collections).
> * I need to deploy and start if there are ejb's bind with Web Service
Similarly, the deployer would construct the gbean configuration, and
when the gbean starts, it would be added to the axis gbean reference
collection.
>
> 3) Invoke a Web Service
> * Axis Servlet will capture the SOAP/HTTP request and go ahead with
> the web service
> * if the impl of the Web Service is a EJB I need to invoke it using
> the Geronimo internals (Using Contianer Index now).
>
> I need to learn following
> 1) How to use the plans to start the Geronimo from a test case. So to
> do it with out hardcoding object names
I think looking at how the EarConfigBuilder is set up shows how to
avoid hardcoding object names. Probably the openejb
EJBConfigBuilderTest has the most detail on starting geromino in code
and doing something like deployment. You might also look at the
openejb itests which run a single instance of geronimo through the
whole test suite.
> 2) How to start a AxisGBean from plan
Include xml configuration for the gbean in the plan. I'd look at
j2ee-system-plan in modules/assembly
> 3) How to start Axis Servlet from the AxisGBean
This should actually be constructing a servlet gbean configuration from
the web service deployer. This will be difficult until we construct
gbeans for regular servlets.
> 4) how to call a deploy(..) method of AxisGBean with out using Kernel
This is sort of the wrong question. We need a web service
configuration builder that can be called by the rest of the deployment
framework. There will be a reference to the web service deployer
somewhere in the deployment framework, and the framework will call the
various deployment methods for you. However, getting this to work
right and fit into geronimo well may require some significant
restructuring of the current framework.
> 5) How to deploy a ejb and start ejb from the AxisGbean
All the web service deployer will need to do is configure a gbean for
the ejb and add it to the configuration object the deployer is
constructing. Geronimo will do the rest for you.
>
> Q1) can somebody name me a module which use plans to bring the
> geronimo up with web, ejb continer, AxisGbean started so that I can
> use junit test to test it? Are they all do it .. will check
> Q2) How can I programtically requst the services from the Geronimo
> (with out using the kernel). e.g. deploy this ejb, start/stop this
> service ect
>
To really request deployment services, you should use jsr-88. This can
be done for instance from maven: you can look at the itests module.
However, to unit test deployment pieces, you can generally either
construct the gbean in code and call it directly or register it with a
kernel and invoke a method from your test code. In a gbean, if you
need to get another gbean to do something, you should have a reference
to it in your gbean: when your gbean has started, there will be an
object there implementing the interface or class you requested, that
you can call methods on directly.
Hope this helps a bit.
many thanks,
david jencks
> if anybody can point me to the testcases in other modules that do the
> above that would be very helpful :)
>
> Thanks
> Srinath
>
> p.s. I wrote the code by looking at the test cases in other modules ,
> see how they setup the geronimo for test ect.
>
Re: Axis module review
Posted by Srinath Perera <he...@gmail.com>.
> I was just reviewing the code in the Axis module and noticed some
> things that are considered no-nos or bad practice with the Geronimo
> architecture. This is our fault for not reviewing the code sooner.
>
> Let me try and make up for this lack of feedback.
Thanks David, when I start with the Axis module I want to get the Web
Service working, and hope things would shape up when the comment come
as I am great beliver of starting with something runing and shape it
up.
let us address the things one by one. To put it in simple words I wan
to do the following
There are three senarios
1) Start Axis
* I need jetty and open ejb running
* I need to start the AxisGBean
* I need to start Axis Servelt inside jetty
2) deploy a Webservice
* I need to invoke the deploy(...) in AxisGBean
* Axis GBean register the Web Service in Axis (which is WS detail I
belive I can handle it)
* I need to deploy and start if there are ejb's bind with Web Service
3) Invoke a Web Service
* Axis Servlet will capture the SOAP/HTTP request and go ahead with
the web service
* if the impl of the Web Service is a EJB I need to invoke it using
the Geronimo internals (Using Contianer Index now).
I need to learn following
1) How to use the plans to start the Geronimo from a test case. So to
do it with out hardcoding object names
2) How to start a AxisGBean from plan
3) How to start Axis Servlet from the AxisGBean
4) how to call a deploy(..) method of AxisGBean with out using Kernel
5) How to deploy a ejb and start ejb from the AxisGbean
Q1) can somebody name me a module which use plans to bring the
geronimo up with web, ejb continer, AxisGbean started so that I can
use junit test to test it? Are they all do it .. will check
Q2) How can I programtically requst the services from the Geronimo
(with out using the kernel). e.g. deploy this ejb, start/stop this
service ect
if anybody can point me to the testcases in other modules that do the
above that would be very helpful :)
Thanks
Srinath
p.s. I wrote the code by looking at the test cases in other modules ,
see how they setup the geronimo for test ect.