Exaclty; not very efficient. And its behave different from the C plugins...


--
Jarl


On 10/10/07, Hugo Visser <[EMAIL PROTECTED]> wrote:
> ** Jarl,
>
> What's not to like about it? Maybe it isn't the most efficient way, but init
> is just once per thread. For long running processes like the plugin server
> that's just a minor overhead for the first user(s) of the plugin server.
>
> Multiple plugin servers will just make your life harder I think. You'd have
> to know which plugin server instance is running a particular plugin, update
> the ar.conf to create aliasses to the plugins etc etc. In the end you don't
> gain much.
>
> Hugo
>
>
> on 10/10/07, Jarl Grøneng <[EMAIL PROTECTED]> wrote:
> > I also see if you have several plugins, all loads the initialize()
> > method when the first plugin are accessed.
> >
> > I really dont like this method doing it, seems like there is a need
> > for several plugin-servers.
> >
> > --
> > Jarl
> >
> > On 10/4/07, Jarl Grøneng <[EMAIL PROTECTED]> wrote:
> > > Hi,
> > >
> > > Found this documentation, and this put a new ligth on my initial
> question.
> > >
> > > ---------------
> > > All plugins can implement a public void static init(ARPluginContext
> > > context) method to do all intialization for this class. This will be
> > > invoked once for each class that implements one of the ARPluggable
> > > interfaces on plugin server startup. This same thing can be
> > > accomplished using a static block of code in the class. The only
> > > advantage in implementing this method is that it gets access to the
> > > ARPluginContext object that can be used for the following purposes.
> > >
> > > 1. Logging any initialization messages
> > > 2. Fetching configuration file entries for this plugin from
> > > pluginsvr_config.xml file.
> > > 3. Get AR System configuration entries from the ar.cfg file.
> > >
> > > For all instance initialization, the public initialize(ARPluginContext
> > > context) should be used. The initialize method is invoked once for
> > > each thread instance in plugin server.
> > > -------------------
> > >
> > > Still i like the C plugin better then, where you have an Termination
> function.
> > >
> > > --
> > > Jarl
> > >
> > >
> > > On 10/4/07, Hugo Visser <[EMAIL PROTECTED]> wrote:
> > > > ** Right, the way I read the javadoc I understand that the initialize
> will
> > > > be called once the plugin is loaded. From the javadoc I can not tell
> for
> > > > sure if that moment is the plugin server is started. It's not clear
> what is
> > > > meant with "at startup load time"...It could be the plugin server
> start up,
> > > > but it could also mean "when the plugin is first started".
> > > >
> > > > But in the end it really doesn't matter how and when it is
> initialized.
> > > > That's just an implementation detail. Just as you initialize at the
> correct
> > > > moment :) The only catch is that the initialize seems to be called
> once for
> > > > every thread that the plugin server starts (so I've been told). That
> isn't
> > > > really documented either...
> > > >
> > > > Hugo
> > > >
> > > >
> > > > On 10/4/07, Jarl Grøneng < [EMAIL PROTECTED]> wrote:
> > > > >
> > > > > I have no proble understand how the plugin-server handle these
> > > > > funstion. But it seems that there is a difference in how a C and
> Java
> > > > > plugin behave.
> > > > >
> > > > > TAnd the plugin documentation states this:
> > > > > initialize(ARPluginContext context)
> > > > > "An initialization routine called once at startup load time for each
> > > > > plugin that is loaded.
> > > > >
> > > > > And this does not happend when the plugin loads, it happend when it
> > > > > gets accessed first time. And for each thread the plugin-server
> runs.
> > > > >
> > > > > The documentation should be like this:
> > > > > "An initialization routine called once at startup load time for each
> > > > > thread instance".
> > > > >
> > > > >
> > > > > If you add this to the plugin:
> > > > > public static void init(ARPluginContext context){
> > > > > //
> > > > > };
> > > > >
> > > > > It does this function when its loads. Sems like I have to move my
> > > > > initialization code here.
> > > > >
> > > > > --
> > > > > Jarl
> > > > >
> > > > > On 10/4/07, Carey Matthew Black <[EMAIL PROTECTED] > wrote:
> > > > > > Jarl,
> > > > > >
> > > > > > I think there might be a bit of confusion due to the terms used...
> > > > > >
> > > > > > I think it is more like this...
> > > > > >
> > > > > >
> > > > > > Ref: Integrating-710.pdf  pg 102
> > > > > > Figure 7-2: C plug-in call sequence
> > > > > >
> > > > > > ARPluginIdentify ()
> > > > > > ARPluginSetProperties ()
> > > > > > ARPluginInitialization ()
> > > > > > ARPluginCreateInstance() -- one or more times
> > > > > >
> > > > > > AREA, ARDBC, or AR Filter calls --
> > > > > >     I think this is per Filter Action
> > > > > >
> > > > > > ARPluginDeleteInstance ()
> > > > > > ARPluginTermination ()
> > > > > >
> > > > > >
> > > > > > I think... the plugin server calls the first 4 methods as soon as
> _it_
> > > > > > starts up. Then when the ARS Server talks to the Plugin Server the
> > > > > > only things that are done are the "AREA, ARDBC, or AR Filter
> calls"
> > > > > > portion(s) of the code.
> > > > > >
> > > > > > I think this makes some sense too. But I do not think it prevents
> the
> > > > > > "AREA, ARDBC, or AR Filter calls" from doing things like spawning
> new
> > > > > > threads (ARPluginCreateInstance() ) or other calls to the previous
> > > > > > methods. ( With a possible exception of the ARPluginIdentify ()
> > > > > > method. I doubt the Plugin Server would deal with a loaded plugin
> > > > > > trying to change its identity very well. But I could be wrong
> about.)
> > > > > >
> > > > > >
> > > > > > Then... when the Plugin server is being shut down I think the
> > > > > > ARPluginDeleteInstance () and ARPluginTermination () methods are
> > > > > > called.
> > > > > >
> > > > > >
> > > > > > So in summary "when the plugin loads" is when the Plugin Server
> reads
> > > > > > and loads the plugin into memory on startup. (And not when a
> Plugin
> > > > > > Call from the ARS server is executed.) The plugins are "standing
> > > > > > daemons" that wait and listen for inquiries.
> > > > > >
> > > > > > But that is just my read of things. (Reality might be very
> different
> > > > > > than what the docs indicate.)
> > > > > >
> > > > > > --
> > > > > > Carey Matthew Black
> > > > > > Remedy Skilled Professional (RSP)
> > > > > > ARS = Action Request System(Remedy)
> > > > > >
> > > > > > Love, then teach
> > > > > > Solution = People + Process + Tools
> > > > > > Fast, Accurate, Cheap.... Pick two.
> > > > > >
> > > > > >
> > > > > > On 10/4/07, Jarl Grøneng < [EMAIL PROTECTED]> wrote:
> > > > > > > Hugo,
> > > > > > >
> > > > > > > The documentation of the java plugin states this:
> > > > > > >
> > > > > > > public void initialize(ARPluginContext context) throws
> ARException {}
> > > > > > > "An initialization routine called once at startup load time for
> each
> > > > > > > plugin that is loaded. The plugin can do all its initialization
> and
> > > > > > > setup in this method."
> > > > > > >
> > > > > > > I see benefits running initialize when the plugin loads.
> > > > > > >
> > > > > > > --
> > > > > > > Jarl
> > > > > >
> > > > > >
> > > >
> _______________________________________________________________________________
> > > > > > UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
> ARSlist:"Where
> > > > the Answers Are"
> > > > > >
> > > > >
> > > > >
> > > >
> _______________________________________________________________________________
> > > > > UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
> ARSlist:"Where
> > > > the Answers Are"
> > > > >
> > > >
> > > >  __20060125_______________________This posting was
> > > > submitted with HTML in it___
> > >
> >
> >
> _______________________________________________________________________________
> > UNSUBSCRIBE or access ARSlist Archives at www.arslist.org ARSlist:"Where
> the Answers Are"
> >
>
>  __20060125_______________________This posting was
> submitted with HTML in it___

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org ARSlist:"Where the 
Answers Are"

Reply via email to