geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <djen...@gluecode.com>
Subject Re: How can a GBean get its ObjectName?
Date Sun, 19 Dec 2004 18:17:13 GMT
You can get the "jsr-77" string version of the objectName by using a 
magic attribute

infoBuilder.addAttribute("objectName", String.class, false); //note 
non-persistent!

I usually include it as a constructor argument, although I think it 
will also work if you have a setter.

If you need the ObjectName, you'd have to call 
ObjectName.getInstance(objectName);

thanks
david jencks

On Dec 19, 2004, at 7:55 AM, Alan D. Cabrera wrote:

> How can a GBean get its ObjectName?
>
> Regards,
> Alan
>
>


Mime
View raw message