There seems to be a problem with collection valued references in 1.1. Normally we want a collection valued reference to determine its members based on the target gbeans implementing an interface. This works great for single valued references but currently there is no way to specify an interface that is actually used for a collection valued reference. I was under the impression that the interface declared in GBeanInfo was used for this purpose but this is not currently the case. There is also no way to specify an interface in the xml for a plan.

As I see it, the desired interface is not something a user should be able to change, and it should be supplied in the gbean metadata, currently GBeanInfo. I think requiring a user to specify the target interface in a plan is an undue burden. However, if metadata is the only source this would make it difficult to, in the future, deploy services with collection valued references that lack metadata entirely.

I think the best solution might be to use metadata if present (from GBeanInfo, annotations, or java 1.5 generics) and allow specifying the interface in the plan as well for when metadata is lacking.

Comments?

I believe this is currently causing a problem with the JettyModuleBuilder and default servlets: the default servlet gbeans implement org.apache.geronimo.jetty.JettyDefaultServletHolder rather than org.apache.geronimo.jetty.JettyServletHolder but since there is no way to specify the desired target interface all servlets end up getting treated as default servlets, causing severe problems when hot deploying a web app.

thanks
david jencks

Reply via email to