You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Mircea Toma <mi...@home.com> on 2001/09/05 06:31:47 UTC

DatagramOutputTarget

Hi,

I was getting started to do the DatagramTargetFactory (?) when I saw that
DatagramOutputTarget doesn't allow to send serialized LogEvent objects,
functionality that would be nice to have if no JMS server is available. So,
I was wondering what is the reason why this is not implemented?
... if because it's the first implementation I can change it to have this
additional functionality!

Mircea


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


Re: [Q] Using RMI in Avalon?

Posted by Paul Hammant <Pa...@yahoo.com>.
Peter,

>interface ManagableService extends Service, Remote {}
>
>or maybe
>
>interface MBeanService extends Service, ...MBean {}
>
I am perhaps joining the conversation late having previously let others 
decide it without input, but based on use of Glue (no I have not been 
sniffing it ;-)

It would be nice to take any interface and make it transportable over 
RMI.  It could be done programmatically (like in SOAPHelloWorld demo) OR 
by an block assembler :

  <rmi-transport>
    <transport name="currency-exchange" 
block-to-transport="currencyexchange" role="org.x.y.z.CurrencyExchange"/>
    <transport name="helloworld" block-to-transport="helloworldserver" 
role="org.apache.avalon.cornerstone.demos.helloworldserver.HelloWorldServer"/>
  </rmi-transport>

RemoteExcpetion (oh how I hate that forced exception) could be added to 
the published interface automatically.  

Somehow invoke out own Stub/Skel generator and it's magically presenting 
an RMI face.... ?

Regards,

- Paul H



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


Re: [Q] Using RMI in Avalon?

Posted by Paul Hammant <Pa...@yahoo.com>.
Indigo,

>Thanks. I just started writing a sample HelloWorld-ish program,
>and I couldn't figure out how to export my remote object.
>Typically I would do this in my main(), but since my block is
>automatically loaded by the framework, I would need some
>sort of hook/interceptor to invoke necessary routines. Could
>somebody help me with this? I just need to do this with only
>one Remote object for bootstrapping purposes.
>
>Is there a general-purpose block, semi-block, or block-ish 
>component which is loaded before any user-services in the framework?
>Or, should I write an "RMI-initialization block", which does
>exporting Remote objects as well as setting SecurityManager, etc?
>Will that work? Thanks, ~Indigo 
>
I am not sure how good a RMI solution would be before we're formalized a 
correct way to do it.

If you want to develop a non-block solution, then focus on Startable and 
Initializable interfaces.  If implmented, the latter's init() is called 
last of all.

If  it's distributed Java rather than RMI per se you are interested in, 
try the Soapification service and glue block - a very easy way to 
publish a set of objects.  No stupid RemoteException either.  Just check 
you in accordance with the Glue license.

Regards,

- Paul H


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


Re: [Q] Using RMI in Avalon?

Posted by Indigo <in...@yahoo.com>.
Thanks. I just started writing a sample HelloWorld-ish program,
and I couldn't figure out how to export my remote object.
Typically I would do this in my main(), but since my block is
automatically loaded by the framework, I would need some
sort of hook/interceptor to invoke necessary routines. Could
somebody help me with this? I just need to do this with only
one Remote object for bootstrapping purposes.

Is there a general-purpose block, semi-block, or block-ish 
component which is loaded before any user-services in the framework?
Or, should I write an "RMI-initialization block", which does
exporting Remote objects as well as setting SecurityManager, etc?
Will that work? Thanks, ~Indigo 


----- Original Message ----- 
From: "Peter Donald" <do...@apache.org>
To: "Avalon Development" <av...@jakarta.apache.org>
Sent: Wednesday, September 05, 2001 1:41 AM
Subject: Re: [Q] Using RMI in Avalon?


> Hiya,
> 
> On Wed, 5 Sep 2001 17:20, Indigo wrote:
> > I'm planning to expose my server interfaces through RMI or RMI/IIOP.
> > Now my question is what is the best way to do this? Should I
> > inherit my interface from both Component and Remote interface?
> > Or should I use some sort of delegation mechanism where Component
> > and Remote are implemented by different objects? Is Component
> > a proper level to handle Remoting? Or shoul I use Service or Block?
> > I haven't found anything relevant in Excalibur or Cornerstone, but
> > in case I have missed, could somebody point me to the right direction
> > if there is some sort of "RMI wrappers" or "CORBA proxy-stub managers"
> > or something like those?
> 
> We have planned something like this with respect to management. In the past 
> we have talked about it a few different ways but the most popular has been 
> something like
> 
> interface ManagableService extends Service, Remote {}
> 
> or maybe
> 
> interface MBeanService extends Service, ...MBean {}
> 
> So eventually you could mark a block as being "manageable" and it would be 
> exported via whatever mechanisms (whether they are RMI/JMX/WBEM/other). This 
> assumes you are using RMI for management of applications.
> 
> 
> If your intention is not management but instead exporting of the object then 
> I would instead do something like
> 
> interface RemoteService extends Service, Remote {}
> interface MyRemoteService extends RemoteService {}
> class MyBlock implements Block, MyRemoteService {}
> 
> does that make sense?
> 
> -- 
> Cheers,
> 
> Pete
> 
> -----------------------------------------------
>    "You can't depend on your eyes when your 
>    imagination is out of focus." -Mark Twain 
> -----------------------------------------------
> 
> 
> ---------------------------------------------------------------------
> 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: [Q] Using RMI in Avalon?

Posted by Peter Donald <do...@apache.org>.
Hiya,

On Wed, 5 Sep 2001 17:20, Indigo wrote:
> I'm planning to expose my server interfaces through RMI or RMI/IIOP.
> Now my question is what is the best way to do this? Should I
> inherit my interface from both Component and Remote interface?
> Or should I use some sort of delegation mechanism where Component
> and Remote are implemented by different objects? Is Component
> a proper level to handle Remoting? Or shoul I use Service or Block?
> I haven't found anything relevant in Excalibur or Cornerstone, but
> in case I have missed, could somebody point me to the right direction
> if there is some sort of "RMI wrappers" or "CORBA proxy-stub managers"
> or something like those?

We have planned something like this with respect to management. In the past 
we have talked about it a few different ways but the most popular has been 
something like

interface ManagableService extends Service, Remote {}

or maybe

interface MBeanService extends Service, ...MBean {}

So eventually you could mark a block as being "manageable" and it would be 
exported via whatever mechanisms (whether they are RMI/JMX/WBEM/other). This 
assumes you are using RMI for management of applications.


If your intention is not management but instead exporting of the object then 
I would instead do something like

interface RemoteService extends Service, Remote {}
interface MyRemoteService extends RemoteService {}
class MyBlock implements Block, MyRemoteService {}

does that make sense?

-- 
Cheers,

Pete

-----------------------------------------------
   "You can't depend on your eyes when your 
   imagination is out of focus." -Mark Twain 
-----------------------------------------------


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


[Q] Using RMI in Avalon?

Posted by Indigo <in...@yahoo.com>.
Hi,

I've been reading design documents and going through some sample 
codes of avalon framework/phoenix for the last couple of weeks.
Obviously, I don't have the "feel" for the overall design (yet).
 
I'm planning to expose my server interfaces through RMI or RMI/IIOP.
Now my question is what is the best way to do this? Should I
inherit my interface from both Component and Remote interface?
Or should I use some sort of delegation mechanism where Component
and Remote are implemented by different objects? Is Component
a proper level to handle Remoting? Or shoul I use Service or Block?
I haven't found anything relevant in Excalibur or Cornerstone, but
in case I have missed, could somebody point me to the right direction
if there is some sort of "RMI wrappers" or "CORBA proxy-stub managers"
or something like those?  

TIA
~Indigo



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


Re: DatagramOutputTarget

Posted by Mircea Toma <mi...@home.com>.
----- Original Message -----
From: "Peter Donald" <do...@apache.org>
To: "Avalon Development" <av...@jakarta.apache.org>
Sent: Tuesday, September 04, 2001 10:50 PM
Subject: Re: DatagramOutputTarget


> On Wed, 5 Sep 2001 14:31, Mircea Toma wrote:
> > I was getting started to do the DatagramTargetFactory (?) when I saw
that
> > DatagramOutputTarget doesn't allow to send serialized LogEvent objects,
> > functionality that would be nice to have if no JMS server is available.
So,
> > I was wondering what is the reason why this is not implemented?
>
> The original purpose of DatagramTarget was to allow you to log to unix
> syslogd daemons by something like DatagramTarget + SyslogFormatter. Thus
why
> there was no serialized support (and LogEvents weren't serialzable back
then).
>
> > ... if because it's the first implementation I can change it to have
this
> > additional functionality!
>
> If you do decide to do that then you will probably have to create a basic
> server that collects the events aswell.

OK, I might do that!

Mircea

>
> --
> Cheers,
>
> Pete
>
> *---------------------------------------------------------*
> | Contrary to popular belief, UNIX is user-friendly. It   |
> | just happens to be selective on who it makes friendship |
> | with.                                                   |
> |                       - Richard Cook                    |
> *---------------------------------------------------------*
>
> ---------------------------------------------------------------------
> 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: DatagramOutputTarget

Posted by Peter Donald <do...@apache.org>.
On Wed, 5 Sep 2001 14:31, Mircea Toma wrote:
> I was getting started to do the DatagramTargetFactory (?) when I saw that
> DatagramOutputTarget doesn't allow to send serialized LogEvent objects,
> functionality that would be nice to have if no JMS server is available. So,
> I was wondering what is the reason why this is not implemented?

The original purpose of DatagramTarget was to allow you to log to unix 
syslogd daemons by something like DatagramTarget + SyslogFormatter. Thus why 
there was no serialized support (and LogEvents weren't serialzable back then).

> ... if because it's the first implementation I can change it to have this
> additional functionality!

If you do decide to do that then you will probably have to create a basic 
server that collects the events aswell.

-- 
Cheers,

Pete

*---------------------------------------------------------*
| Contrary to popular belief, UNIX is user-friendly. It   |
| just happens to be selective on who it makes friendship |
| with.                                                   |
|                       - Richard Cook                    |
*---------------------------------------------------------*

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