Perlbal - When/how is Plugin->register called?

This is Interesting: Free IT Magazines  
Home > Archive > Perlbal > October 2007 > When/how is Plugin->register called?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author When/how is Plugin->register called?
Matthew Pitts

2007-10-24, 7:12 pm

Can anyone shine some light on this for me? I'm trying to write a Plugin
and can't figure out when and how my plugin's register method is called.

I've looked at some other plugins (stats and vhosts) and even created my
own copies of each with die statements as the first line in the
'register' method to glean some information about the flow, but I never
got any dies or error messages.

I've also found a section in Service->set to handle the 'plugins' key,
which calls each plugin's register method, but I can't figure out under
what context the Service->set method is called.

Thanks for the help!

--
Matthew W. Pitts
Software Engineer
mpitts@a3its.com
336.202.3913 (mobile)

A3 IT Solutions, LLC
www.a3its.com



Brett Hoerner

2007-10-24, 7:12 pm

On 10/24/07, Matthew Pitts <mpitts@a3its.com> wrote:
> Can anyone shine some light on this for me? I'm trying to write a Plugin
> and can't figure out when and how my plugin's register method is called.


Doing a "LOAD MyPlugin" will call the load method, and after that,
using "SET plugins = myplugin" is
allowed inside of a Service, and that runs the register method.

LOAD MyPlugin # calls load
CREATE SERVICE test
SET role = reverse_proxy
SET pool = test_pool
SET plugins = myplugin # calls register for this plugin on this service
ENABLE test

Brett

Matthew Pitts

2007-10-24, 7:12 pm

On Wed, 2007-10-24 at 14:07 -0500, Brett Hoerner wrote:
> Doing a "LOAD MyPlugin" will call the load method, and after that,
> using "SET plugins = myplugin" is
> allowed inside of a Service, and that runs the register method.
>
> LOAD MyPlugin # calls load
> CREATE SERVICE test
> SET role = reverse_proxy
> SET pool = test_pool
> SET plugins = myplugin # calls register for this plugin on this
> service
> ENABLE test


Cool, thanks for the info. This helps me out a lot.

--
Matthew W. Pitts
Software Engineer
mpitts@a3its.com
336.202.3913 (mobile)

A3 IT Solutions, LLC
www.a3its.com



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com