+1 on this one too. I think such examples would be awesome.


-----Original Message----- From: Vikas Phonsa [mailto:[EMAIL PROTECTED] Sent: Monday, February 16, 2004 1:19 PM To: 'Avalon framework users' Subject: RE: Accessing components from Non components

Aaron,

You might be right, there might be examples which we can't find.


>* Establish a container [Merlin and/or Fortress] in a simple main > method and get some simple output form a service

I think Merlin CLI already does that. But the guts of CLI are not typically
exposed to a beginner. So if we have an example which just has the simple
CLI functionality of loading Merlin Kernel, without all the other code for
handling various command line arguments, it would make understanding the
Avalon embedding far simpler to beginners. And I think we should keep Merlin
and Fortress separate here, cause you understand the nuances, but mixing
these would make things harder for beginners. If a separate example for
Fortress could be presented also, then more power to you.


>* A simple Swing application in which some frame class accesses > components via an embedded container

Exactly. It doesn't necessarily has to be a swing class, but again more
power to you. Basically any class which is not a component but has a
starting point like a main method access the methods of the components
loaded within the embedded Merlin Kernel

* A simple webapp which starts up a container and then has a second
  servlet access services via the container
Yeah, very right. This would take things to the next level.


I know you use Fortress a lot, but if Merlin is the is the latest and the greatest then such examples preferably should use Merlin only. Or there should be distinction between examples using Merlin and Fortress.


And thanks a lot for your assistance. I think these examples would help beginners a lot.

Vikas



From: "Mathews Julien" <[EMAIL PROTECTED]>
Reply-To: "Avalon framework users" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: RE: Accessing components from Non components
Date: Mon, 16 Feb 2004 19:48:30 +0000

+1 on this one. I would like to see such an example also.

And I would also like to hear from anybody in the list who has implemented this functionality, but who is not involved in Avalon or Merlin development at Apache.

If there is anyone like that in the list then we can say that Merlin has started to go places now.


And thanks for your good work guys.




Mathews


From: Vikas Phonsa <[EMAIL PROTECTED]>
Reply-To: "Avalon framework users" <[EMAIL PROTECTED]>
To: 'Avalon framework users' <[EMAIL PROTECTED]>
Subject: RE: Accessing components from Non components
Date: Mon, 16 Feb 2004 11:42:20 -0800

Hi Everybody,

The issue of accessing components from non components in still bugging me.

Stephen wrote:
>There are several fully-functional examples of this in the merlin cvs.
>A skeleton servlet containing a kernel is under the
>merlin/kernel/servlet subproject.

As suggested by Stephen, I looked at the MerlinServlet ( let me warn that I
may not have the very latest version) and it seems that it is supposed to
load up Merlin in a webapp just like CLI does for a command line
application. Now which examples have non components accessing components ?




Aaron Farr wrote a few days ago:

>Merlin through the Kernel interface allow external objects to lookup hosted
>components. For example, with Fortress, you can get a DefaultContainer and
>then get a hold on the ServiceManager. I prefer to setup the container in
>a ServletContextListener which isolates the initialization code and then
>place a copy of the ServiceManager or Kernel or whatever in the
>ServletContext



Could some one give like few lines of code (for a non component class with a
main method not involving JNDI lookups) which could be used to access our
HelloComponent running inside a Merlin Container? I mean if components are
obtained from Kernel in Merlin, then pls point out how ?????


I think this simple class could make lots of things much clearer for others.

I think that this is a very basic issue which everybody who uses Avalon or
Merlin would have to take care of. I couldn't find an example of that in the
Merlin tutorial examples, the last time I looked at those. So if it is there
then pls point out.


Give an example guys, and I would also document it and put in wiki.


Thanks in advance.


Vikas





-----Original Message-----
From: Leo Simons [mailto:[EMAIL PROTECTED]
Sent: Friday, February 13, 2004 12:56 AM
To: [EMAIL PROTECTED]
Subject: Re: Accessing components from Non components

Joerg Heinicke wrote:
> I'm also interested in accessing components from non-components. But I use
> Cocoon


I think cocoon has configuration options and/or blocks that allow you to
export over JNDI and a number of other methods. That might be what you want.


--
cheers,

- Leo Simons

-----------------------------------------------------------------------
Weblog              -- http://leosimons.com/
IoC Component Glue  -- http://jicarilla.org/
Articles & Opinions -- http://articles.leosimons.com/
-----------------------------------------------------------------------
"We started off trying to set up a small anarchist community, but
  people wouldn't obey the rules."
                                                         -- Alan Bennett



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


_________________________________________________________________
Let the advanced features & services of MSN Internet Software maximize your online time. http://click.atdmt.com/AVE/go/onm00200363ave/direct/01/



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]


_________________________________________________________________
Keep up with high-tech trends here at "Hook'd on Technology." http://special.msn.com/msnbc/hookedontech.armx



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to