How does a container know which component is the starting point of any application. Does the root component in the block.xml specify that ?
And how can we have container call a method on that component which doesn't implement any Framework interfaces.
For Examples in HelloComponent If I put a "System.out.println("Hello World ")" in the initialize() method I would get an "hello world" out put. Cause the container would run the initialize method following the sequence specified by the Framework.
But say I want to define a method in HelloComponent:
public String printHelloWorld(){
return "Hello World";
}
And now I want to use this component method from a class ( say Test )that doesn't implement any Framework interfaces. And I want to make this Test class the starting point of my application.
When I say starting point, I mean, like a gui application can start from a main program. So that main program would be the starting point of an application.
In my container, some component gotta be the starting point of my application, right ?
Or am on a wrong line of thinking.
Thanks
Mathews
From: Stephen McConnell <[EMAIL PROTECTED]> Reply-To: "Avalon framework users" <[EMAIL PROTECTED]> To: Avalon framework users <[EMAIL PROTECTED]> Subject: Re: Non component class as the starting point Date: Mon, 19 Jan 2004 19:51:11 +0100
Julien:
Any class can be a component - all that you need to to add a xinfo file. You can create this manually or use javadoc tags to automate the process. A simple xinfo for the root object you describing could look like:
<type> <info> <name>whatever</name> <lifestyle>singleton</lifestyle> </info> <dependencies> <dependency key="hello" type="tutorial.Hello" version="1.1"/> </dependencies> </type>
The only constraint is that the object has a null constructor (and chances are that even this will be eliminated in the near future).
Cheers, Steve.
Mathews Julien wrote:
Hi Guys,
I want to know if the starting point of an application can be a non component class.
For example say I want to use the HelloComponent with a class that is not a component. Normally we define the dependencies for a component using the avalon meta tags.
Can we define a component as a dependency for a non component class and modify the xml property files, so that the non component class is started by the container as the starting point.
Thanks
_________________________________________________________________
Let the new MSN Premium Internet Software make the most of your high-speed experience. http://join.msn.com/?pgmarket=en-us&page=byoa/prem&ST=1
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--
|------------------------------------------------| | Magic by Merlin | | Production by Avalon | | | | http://avalon.apache.org/merlin | | http://dpml.net/merlin/distributions/latest | |------------------------------------------------|
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
_________________________________________________________________
Scope out the new MSN Plus Internet Software — optimizes dial-up to the max! http://join.msn.com/?pgmarket=en-us&page=byoa/plus&ST=1
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]