You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Michael Bachran <mb...@onebridge.de> on 2001/08/06 09:45:53 UTC

RE: avalon and soap (+ JMS + JNDI)

Hi,

I wonder if it is easy to make a Avalon component run within Phoenix and
within any EJB-Container interchangable by making the component a EJB. This
way using the features of the container for any component.
Is there allready a component that works as a 'gateway' to EJB-applications?
Or how would I realize an integration into existing EJB-based systems that
use anycommercial container.

Am I right that Phoenix (or the Component look up mechanism at all) is using
an rmiRegistry for lookup?

Actually I am more interested in JMS than in EJB. How does JMS match with
Avalon? Does it make sense to use both in an integrated way? JMS seems to
have a potential for scalable distributed (server-)applications. But JMS
uses JNDI for lookup. And when do I use JMS and when Avalon to do a
lookup/kommunication? Maybe there might be an interface a block can
implement that makes tha block able to send and consume messages?

Hm! As Peter said, SOAP seems to be the perfect way to integrate with non
java (especially Microsoft) environments.


Thanks, Michael



-----Original Message-----
From: Peter Donald [mailto:donaldp@apache.org]
Sent: Monday, August 06, 2001 8:49 AM
To: Avalon Development
Subject: Re: avalon and soap


On Mon,  6 Aug 2001 16:07, fanyun wrote:
> After study avlon for 1 week, I feel it provide a way programmer can build
> seperated software blocks and configure them to work together using XML.
I
> wonder is it just like using Soap Services to build application.  Or like
> the way EJB works.
>
> Can any one explain what is the difference between these 3:   Avalon,
Soap,
> EJB

I can try ;)

Avalon/Phoenix and EJB are both *software* service APIs. They describe a way
to implement services. The difference is the type of services they can
implement. EJBs are restricted to buisness object services (Session and
Message beans) or data facades (Entity beans). EJBs also impose restrictions
on what you can do (threading, file access, net access). EJBs are also
inherently a "request/response" API. A "user" makes a resquest and gets a
response (possibly asnchronously via MessageBeans). The containers can make
all sorts of optimizations to optimize performance (multiple instances of
each service etc). EJBs are generally useful for writing buisness objects
and
their support - they can be shoehorned into other realms but that is not
their strength.

Avalon/Phoenix is a more general "service" API. In it you create components
that provide services (to other software components). The API is not
designed
around request/response cycle and each component can manage their own
threads
and activity levels. The container also does not try to manage other aspects
(like replicating blocks across multiple servers or anything like that). It
is more aimed at creating "servers" and would be a perfect base on which to
build an EJB server.

SOAP is an XML format for RPC calls generally used in construction of "web"
services. What this means is that EJBs could be used as software component
and could talk using SOAP protocol to other distributed components (that
could be written in anything from Avalons blocks to MSes COM+ components to
python CORBA objects).

I think I got that right but I am not an expert in EJB or SOAP so ... ;)

Cheers,

Pete

*-----------------------------------------------------*
| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |
*-----------------------------------------------------*

---------------------------------------------------------------------
To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: avalon-dev-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: avalon-dev-help@jakarta.apache.org


Re: avalon and soap (+ JMS + JNDI)

Posted by Jeff Turner <je...@socialchange.net.au>.
On Wed, Aug 08, 2001 at 11:34:06AM +0200, Michael Bachran wrote:
> > -----Original Message-----
> > From: Peter Donald [mailto:donaldp@apache.org]
> > Sent: Wednesday, August 08, 2001 10:01 AM
> > To: Avalon Development
> > Subject: Re: avalon and soap (+ JMS + JNDI)
> >
> >
> > On Wed,  8 Aug 2001 17:38, Michael Bachran wrote:
> > > What about a locking mechanism in Avalon? Can it be imlemented
> > based of an
> > > object pool?
> > > Or is there already one?
> >
> > Not sure what you mean exactly ;)
> > Avalon/Excalibur has a Component pool and has separate locks (in
> > concurrent
> > package) but I don't think thats what you are getting at?
> >
> 
> I want to handle metadata independent from the persistence system like
> rdbms, odbms or xml-files (that should be interchangable). Therefore
> basically the metadat is represented by java classes/instances I need to
> work on concurrently doing internal locking and so on, combining that with
> clustering and load balancing of components (and maybe caching of metadata
> objects).
> I wonder how easily that can be done with Avalon. Seems to me that the
> concurrent package might help for the locking. I have to take a closer look
> at that.

Have you had a look at Castor (http://castor.exolab.org/)? It handles
object persistence to XML, LDAP, RDBMS, and necessarily has quite a
snazzy locking/transaction system. No doubt metadata plays quite a large
role.

--Jeff


> 
> Ciao, Michael
> For additional commands, e-mail: avalon-dev-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: avalon-dev-help@jakarta.apache.org


Re: avalon and soap (+ JMS + JNDI)

Posted by Peter Donald <do...@apache.org>.
On Wed,  8 Aug 2001 19:34, Michael Bachran wrote:
> > -----Original Message-----
> > From: Peter Donald [mailto:donaldp@apache.org]
> > Sent: Wednesday, August 08, 2001 10:01 AM
> > To: Avalon Development
> > Subject: Re: avalon and soap (+ JMS + JNDI)
> >
> > On Wed,  8 Aug 2001 17:38, Michael Bachran wrote:
> > > What about a locking mechanism in Avalon? Can it be imlemented
> >
> > based of an
> >
> > > object pool?
> > > Or is there already one?
> >
> > Not sure what you mean exactly ;)
> > Avalon/Excalibur has a Component pool and has separate locks (in
> > concurrent
> > package) but I don't think thats what you are getting at?
>
> I want to handle metadata independent from the persistence system like
> rdbms, odbms or xml-files (that should be interchangable). Therefore
> basically the metadat is represented by java classes/instances I need to
> work on concurrently doing internal locking and so on, combining that with
> clustering and load balancing of components (and maybe caching of metadata
> objects).
> I wonder how easily that can be done with Avalon. Seems to me that the
> concurrent package might help for the locking. I have to take a closer look
> at that.

Ouch! I guess Avalon could be used to do something like that along with a 
XML/XSLT tool to create bindings however its a huge amount of work. Have you 
looked at the JDO specification from JCP? I looked at it for a bit and it 
seemed mostly good (didn't play nice with distributed transactions though 
IIRC). Anyways if you decide to implement it yourself goodluck - you are 
going to need it - I wenth through the pain of binding objects 
to network protocols and know how irritating the bugs in those setups can be 
;)

Cheers,

Pete

*-----------------------------------------------------*
| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |
*-----------------------------------------------------*

---------------------------------------------------------------------
To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: avalon-dev-help@jakarta.apache.org


RE: avalon and soap (+ JMS + JNDI)

Posted by Michael Bachran <mb...@onebridge.de>.
> -----Original Message-----
> From: Peter Donald [mailto:donaldp@apache.org]
> Sent: Wednesday, August 08, 2001 10:01 AM
> To: Avalon Development
> Subject: Re: avalon and soap (+ JMS + JNDI)
>
>
> On Wed,  8 Aug 2001 17:38, Michael Bachran wrote:
> > What about a locking mechanism in Avalon? Can it be imlemented
> based of an
> > object pool?
> > Or is there already one?
>
> Not sure what you mean exactly ;)
> Avalon/Excalibur has a Component pool and has separate locks (in
> concurrent
> package) but I don't think thats what you are getting at?
>

I want to handle metadata independent from the persistence system like
rdbms, odbms or xml-files (that should be interchangable). Therefore
basically the metadat is represented by java classes/instances I need to
work on concurrently doing internal locking and so on, combining that with
clustering and load balancing of components (and maybe caching of metadata
objects).
I wonder how easily that can be done with Avalon. Seems to me that the
concurrent package might help for the locking. I have to take a closer look
at that.

Ciao, Michael


---------------------------------------------------------------------
To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: avalon-dev-help@jakarta.apache.org


Re: avalon and soap (+ JMS + JNDI)

Posted by Peter Donald <do...@apache.org>.
On Wed,  8 Aug 2001 17:38, Michael Bachran wrote:
> What about a locking mechanism in Avalon? Can it be imlemented based of an
> object pool?
> Or is there already one?

Not sure what you mean exactly ;)
Avalon/Excalibur has a Component pool and has separate locks (in concurrent 
package) but I don't think thats what you are getting at?

> > I don't know the specifics (as I said not an EJB guy really) but
> > I believe
> > weblogic offers the ability to enter "T3 startup classes" that
> > can be mapped
> > into JNDI space somehow. (No idea what that means though). There
> > is at least
> > one group I know of who use parts of Avalon/Phoenix and James in
> > this way. I
> > don't know the specifics or even if it is a good solution.
> >
> > Hopefully when the Services JSR actually starts Avalon will also offer
>
> Services JSR? What's that about?

Basically an effort to standardize an API like Avalon/Phoenix and brand it as 
part of J2EE. 

> > > Actually I am more interested in JMS than in EJB. How does JMS
> >
> > match with
> >
> > > Avalon?
> >
> > JMS could be integrated with Avalon and work well but isn't at
> > the moment. I
> > see JMS as no different from other resources (ie see SocketManager, or
> > ConnectionManager).
>
> So you don't see the neccessity to use it?

In certain cases it would be great and less so in other cases ... I guess I 
can't see much difference between it JDBC, vanilla sockets, etc in 
terms of "necessity".

> > I would implement a MessagingManager interface that did all the
> > JNDI magic
> > behind it and just gave you basic access to
> > topics/queues/sessions/whatevers
> > via a simple interface.
>
> What about combining the MessagingManager interface with a
> JNDIComponentManager (as Jeffs mentioned)?

That could work ;)

>
> > >Maybe there might be an interface a block can
> > > implement that makes tha block able to send and consume messages?
> >
> > Probably like ConnectionHandler (consumer of connections) in the
> > ConnectionManager setup?
>
> Hmmm... Yes! Maybe a 'DefaultMessagingManager' might become member of a
> component that wants to communicate through the MessagingManager Iterface.
> I am not sure about the seperation. Maybe I need a JMSConnectionHandler.
> Maybe I want two seperate iterfaces for sending and consuming. I don't know
> jet.

me neither - I think the only way to find out would be to experiment and see 
what works ;)

Cheers,

Pete

*-----------------------------------------------------*
| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |
*-----------------------------------------------------*

---------------------------------------------------------------------
To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: avalon-dev-help@jakarta.apache.org


RE: avalon and soap (+ JMS + JNDI)

Posted by Michael Bachran <mb...@onebridge.de>.
> -----Original Message-----
> From: Peter Donald [mailto:donaldp@apache.org]
> Sent: Monday, August 06, 2001 3:28 PM
> To: Avalon Development
> Subject: Re: avalon and soap (+ JMS + JNDI)
>
>
> On Mon,  6 Aug 2001 17:45, Michael Bachran wrote:
> > I wonder if it is easy to make a Avalon component run within Phoenix and
> > within any EJB-Container interchangable by making the component a EJB.
>
> Possible yes ... but I wouldn't advise it ;)
> I would pefer to keep buisness objects as EJBs and other doing
> utilitys as
> Blocks.
>
> > This
> > way using the features of the container for any component.
> > Is there allready a component that works as a 'gateway' to
> > EJB-applications? Or how would I realize an integration into existing
> > EJB-based systems that use anycommercial container.

Ok! So maybe I would implement metadata classes as EJBs ...
What about a locking mechanism in Avalon? Can it be imlemented based of an
object pool?
Or is there already one?

> I don't know the specifics (as I said not an EJB guy really) but
> I believe
> weblogic offers the ability to enter "T3 startup classes" that
> can be mapped
> into JNDI space somehow. (No idea what that means though). There
> is at least
> one group I know of who use parts of Avalon/Phoenix and James in
> this way. I
> don't know the specifics or even if it is a good solution.
>
> Hopefully when the Services JSR actually starts Avalon will also offer

Services JSR? What's that about?

> services using its API and thus be able to be integrated into any
> arbitrary
> EJB container or whatever.
>
> > Am I right that Phoenix (or the Component look up mechanism at all) is
> > using an rmiRegistry for lookup?
>
> nope ;)
> Some blocks *may* be registered with rmi registry if you use JMX
> manager and
> use RMI agent for JMX manager ... but there is nothing that requires it.

Oh! I see! Its based on a HashMap!

>
> > Actually I am more interested in JMS than in EJB. How does JMS
> match with
> > Avalon?
>
> JMS could be integrated with Avalon and work well but isn't at
> the moment. I
> see JMS as no different from other resources (ie see SocketManager, or
> ConnectionManager).
>

So you don't see the neccessity to use it?

> > Does it make sense to use both in an integrated way? JMS seems to
> > have a potential for scalable distributed (server-)applications.
>
> yup.
>
> >But JMS
> > uses JNDI for lookup. And when do I use JMS and when Avalon to do a
> > lookup/kommunication?
>
> I would implement a MessagingManager interface that did all the
> JNDI magic
> behind it and just gave you basic access to
> topics/queues/sessions/whatevers
> via a simple interface.

What about combining the MessagingManager interface with a
JNDIComponentManager (as Jeffs mentioned)?

> >Maybe there might be an interface a block can
> > implement that makes tha block able to send and consume messages?
>
> Probably like ConnectionHandler (consumer of connections) in the
> ConnectionManager setup?

Hmmm... Yes! Maybe a 'DefaultMessagingManager' might become member of a
component that wants to communicate through the MessagingManager Iterface.
I am not sure about the seperation. Maybe I need a JMSConnectionHandler.
Maybe I want two seperate iterfaces for sending and consuming. I don't know
jet.



Thanks for youe feedback,

Michael


---------------------------------------------------------------------
To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: avalon-dev-help@jakarta.apache.org


Re: avalon and soap (+ JMS + JNDI)

Posted by Peter Donald <do...@apache.org>.
On Mon,  6 Aug 2001 17:45, Michael Bachran wrote:
> I wonder if it is easy to make a Avalon component run within Phoenix and
> within any EJB-Container interchangable by making the component a EJB. 

Possible yes ... but I wouldn't advise it ;) 
I would pefer to keep buisness objects as EJBs and other doing utilitys as 
Blocks.

> This
> way using the features of the container for any component.
> Is there allready a component that works as a 'gateway' to
> EJB-applications? Or how would I realize an integration into existing
> EJB-based systems that use anycommercial container.

I don't know the specifics (as I said not an EJB guy really) but I believe 
weblogic offers the ability to enter "T3 startup classes" that can be mapped 
into JNDI space somehow. (No idea what that means though). There is at least 
one group I know of who use parts of Avalon/Phoenix and James in this way. I 
don't know the specifics or even if it is a good solution.

Hopefully when the Services JSR actually starts Avalon will also offer 
services using its API and thus be able to be integrated into any arbitrary 
EJB container or whatever.

> Am I right that Phoenix (or the Component look up mechanism at all) is
> using an rmiRegistry for lookup?

nope ;)
Some blocks *may* be registered with rmi registry if you use JMX manager and 
use RMI agent for JMX manager ... but there is nothing that requires it.

> Actually I am more interested in JMS than in EJB. How does JMS match with
> Avalon? 

JMS could be integrated with Avalon and work well but isn't at the moment. I 
see JMS as no different from other resources (ie see SocketManager, or 
ConnectionManager).

> Does it make sense to use both in an integrated way? JMS seems to
> have a potential for scalable distributed (server-)applications. 

yup.

>But JMS
> uses JNDI for lookup. And when do I use JMS and when Avalon to do a
> lookup/kommunication? 

I would implement a MessagingManager interface that did all the JNDI magic 
behind it and just gave you basic access to topics/queues/sessions/whatevers 
via a simple interface. 

>Maybe there might be an interface a block can
> implement that makes tha block able to send and consume messages?

Probably like ConnectionHandler (consumer of connections) in the 
ConnectionManager setup?

Cheers,

Pete

*-----------------------------------------------------*
| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |
*-----------------------------------------------------*

---------------------------------------------------------------------
To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: avalon-dev-help@jakarta.apache.org