You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by Cristian Roldan <ro...@yahoo.com.ar> on 2006/01/29 23:36:16 UTC

Geronimo configuration directory

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 ?
   
   
  Thanks
   
   

		
---------------------------------
 1GB gratis, Antivirus y Antispam
 Correo Yahoo!, el mejor correo web del mundo
 Abrí tu cuenta aquí

Re: Geronimo configuration directory

Posted by Cristian Roldan <ro...@yahoo.com.ar>.
Hi Aaron,
  Thanks, PorletManger is what I need.
  I'm coding a JVM configuration porlet, the main idea is to learn more about Geronimo console, I'm coding this functionality just to get more knowledge on Geronimo. You know coding real things is the only way to understand Geronimo's architecture/evironment and source code.
   
  Thanks.
  

Aaron Mulder <am...@alumni.princeton.edu> escribió:
  On 1/30/06, Cristian Roldan 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 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í
>
>
  


		
---------------------------------
 1GB gratis, Antivirus y Antispam
 Correo Yahoo!, el mejor correo web del mundo
 Abrí tu cuenta aquí

Re: Geronimo configuration directory

Posted by Aaron Mulder <am...@alumni.princeton.edu>.
On 1/30/06, Cristian Roldan <ro...@yahoo.com.ar> 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 <da...@yahoo.com> 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í
>
>

Re: Geronimo configuration directory

Posted by Cristian Roldan <ro...@yahoo.com.ar>.
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 ?
   
  Thanks.
  

David Jencks <da...@yahoo.com> 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í

Re: Geronimo configuration directory

Posted by David Jencks <da...@yahoo.com>.
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í