Can anyone shed some light on this ?

On Tue, Apr 12, 2011 at 2:36 PM, Shawn Jiang <[email protected]> wrote:

> Hi devs,
>
>
> I met a NPE in
>
> org.apache.openejb.assembler.classic.EjbJarBuilder.build(EjbJarInfo,
> List<Injection>) {
> ...
> Container container = (Container) props.get(ejbInfo.containerId);   //
> containerId is null here
> ...
> }
>
>
> I tried to find when containerId is set.   and find it's here:
>
> org.apache.openejb.config.AutoConfig.deploy(EjbModule, AppResources) {
> ...
>
>  if (ejbDeployment.getContainerId() == null && !skipMdb(bean)) {
>                 String containerId = getUsableContainer(containerInfoType,
> bean, appResources);
>                 if (containerId == null){
>                     containerId = createContainer(containerInfoType,
> ejbDeployment, bean);
>                 }
>                 ejbDeployment.setContainerId(containerId);
>             }
> ...
>
> }
>
>
> The problem is that when using openejb in geronimo.   skipMdb(bean)  will
> always return true if bean is a MDB.    So that the containerId does not
> have a chance to be set at all.  The logic of skipMdb is:
>
>  private static boolean skipMdb(Object bean) {
>         return bean instanceof MessageDrivenBean &&
> SystemInstance.get().hasProperty("openejb.geronimo");
>     }
>
>
> Any thoughts why we don't set the containerId for MDB from openejb side
> when working with geronimo ?
>
>
>
> --
> Shawn
>



-- 
Shawn

Reply via email to