geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim McConnell <>
Subject Re: help! gbean ref doesn't contain added interfaces
Date Fri, 01 Dec 2006 21:55:07 GMT
Hi Aaron, just out of curiosity  where would one look to find this "warning" 
message you refer to below  since the scenario that Sachin described is during 
the build process....


Aaron Mulder wrote:
> So what you get back is ordinarily a proxy to the actual service.  If
> you get the abstract name for the returned module builder (the kernel
> has a call to do that) and then get a fresh proxy to it (from the
> proxy manager from the kernel), does it include your new interface?
> If so, it suggests that the proxies generated for the reference
> include only the interfaces that match the reference type.  If not, it
> may be that the class loader that's provided to create the proxy
> doesn't include the added interface (though there used to be a warning
> emitted every time this happened).  I'm not sure what could be done to
> work around that -- maybe either add the interface to other modules as
> needed or contrive to use the right module's class loader to create
> the proxy.
> Thanks,
>     Aaron
> On 12/1/06, Sachin Patel <> wrote:
>> I'm having some trouble figuring out why I'm getting a ClassCastException
>> and would appreciate if someone could shed some light...
>> In TomcatModuleBuilder I implement an "additional" interface 
>> ModuleBuilder2
>> as well as add..
>> static {
>> ...
>>  infoBuilder.addInterface(ModuleBuilder2.class)
>> ...
>> }
>> But then in EARConfigBuilder if I call...
>> ((ModuleBuilder2) getWebConfigBuilder())
>> I get a ClassCastException casting it to ModuleBuilder2 during the 
>> building
>> of the configs which I don't understand why.  If I inspect the 
>> interfaces of
>> getWebConfigBuilder() it only returns ModuleBuilder and
>> GeronimoManagedGBean.  Why isn't ModuleBuilder2 being listed?
>> I tried updated the referenceType for WebBuilder in EARConfigBuilder from
>> ModuleBuilder to ModuleBuilder2, but then in that case 
>> getWebConfigBuilder
>> ends up returning null.
>> What am I missing? Why can't I add an additional interface to the
>> TomcatModuleBuilder GBean?
>> Thanks
>> -sachin

View raw message