You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by Joe Bohn <jo...@earthlink.net> on 2005/11/29 21:56:28 UTC
BasicKernel.listGBeansByInterface(String[] interfaces) question
Is there a reason why BasicKernel.listGBeansByInterface(String[]
interfaces) first obtains the GBeanData for the named object to get the
GBeanInfo instead of just directly getting the GBeanInfo for the named
object? (see line 289 of BasicKernel). It looks as if GBeanInfo(name)
would be more efficient.
I was wondering because I was looking into a strange side effect of hot
deploy. Hot deploy attempts to learn if the server is up by looking for
GBeans that support the PersistentConfigurationList interface so that it
can find at least one with the kernelFullyStarted attribute set. It
does this every few seconds which over time results in a lot of object
creation/deletion. However, for the kernel to perform the interface
query it iterates through all of the GBeans, first creating a GBeanData
for each and then getting the GBeanInfo from the GBeanData. The
creation of the GBeanData results in all attributes being queried and
set in the GBeanData for every GBean.
Perhaps this is a nit, but it seems like some unnecessary over-head.
Should I open a JIRA and provide a patch to get the GBeanInfo directly?
Joe
--
Joe Bohn
joe.bohn@earthlink.net
"He is no fool who gives what he cannot keep, to gain what he cannot
lose." -- Jim Elliot
Re: BasicKernel.listGBeansByInterface(String[] interfaces) question
Posted by Joe Bohn <jo...@earthlink.net>.
Thanks for the confirmation. I've created JIRA GERONIMO-1246, for this
issue.
http://issues.apache.org/jira/browse/GERONIMO-1246
Thanks,
Joe
Dain Sundstrom wrote:
> On Nov 29, 2005, at 12:56 PM, Joe Bohn wrote:
>
>> Is there a reason why BasicKernel.listGBeansByInterface(String[]
>> interfaces) first obtains the GBeanData for the named object to get
>> the GBeanInfo instead of just directly getting the GBeanInfo for the
>> named object? (see line 289 of BasicKernel). It looks as if
>> GBeanInfo(name) would be more efficient.
>
>
> That is grossly inefficient. The code should just ask for the
> gbeanInfo directly.
>
> -dain
>
>
--
Joe Bohn
joe.bohn@earthlink.net
"He is no fool who gives what he cannot keep, to gain what he cannot
lose." -- Jim Elliot
Re: BasicKernel.listGBeansByInterface(String[] interfaces) question
Posted by Dain Sundstrom <da...@iq80.com>.
On Nov 29, 2005, at 12:56 PM, Joe Bohn wrote:
> Is there a reason why BasicKernel.listGBeansByInterface(String[]
> interfaces) first obtains the GBeanData for the named object to get
> the GBeanInfo instead of just directly getting the GBeanInfo for
> the named object? (see line 289 of BasicKernel). It looks as if
> GBeanInfo(name) would be more efficient.
That is grossly inefficient. The code should just ask for the
gbeanInfo directly.
-dain