On 1/30/06, Cristian Roldan <[EMAIL PROTECTED]> wrote:
> Hi David,
>     I'm traying to extend the admin console with a new portlet, this portlet
> should create a file on $GERONIMO_HOME/var/config, that the reason why I
> need the full path of config directory.
>
> Question: How can I get a instance of ServerInfo ?

You should look at PortletManager [which ends up using
ManagementHelper (an interface), and KernelManagementHelper (an
implementation of that interface)] in the existing portlet code. 
Basically, you can do something like this:

J2EEServer server = PortletManager.getCurrentServer(portletRequest);
ServerInfo info = PortletManager.getServerInfo(portletRequest, server);

(This is from memory so it may be a bit off, but it should be close.) 
What kind of portlet are you working on?

Thanks,
    Aaron

> David Jencks <[EMAIL PROTECTED]> escribió:
>
>
>
>
> On Jan 29, 2006, at 2:36 PM, Cristian Roldan wrote:
>
>
> Hi community !!
>
>     I need to get the full path of the configuration directory, is there any
> Geronimo service/static class/JMX/Gbean that can give me that information ?
>
> I have to ask why :-) and what exactly you mean by configuration
> directory...
>
>
> You can get the location of the entire geronimo server from ServerInfo, and
> the location of config.xml relative to that from the local attribute manager
> gbean.  However, there may not necessarily be a local attribute manager.
>
>
> These are typically set up in the "root" configuration such as j2ee-system
> or client-system: the packaging plugin has no such root configuration but
> installs a few gbeans in code.  You can't override gbean attributes in these
> root configurations.
>
>
> Several people have mentioned in the past and Vincent Massol recently has an
> urgent need to allow relocating the var directory in some way and this will
> probably get implemented in the next few days as soon as we can figure out
> what we want to do.
>
>
> thanks
> david jencks
>
>
>
>
>
> Thanks
>
>
>
>  ________________________________
>  1GB gratis, Antivirus y Antispam
> Correo Yahoo!, el mejor correo web del mundo
> Abrí tu cuenta aquí
>
>
>
>
>  ________________________________
>  1GB gratis, Antivirus y Antispam
>  Correo Yahoo!, el mejor correo web del mundo
>  Abrí tu cuenta aquí
>
>

Reply via email to