geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Jiang <genspr...@gmail.com>
Subject Re: svn commit: r1136332 - /geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java
Date Sat, 18 Jun 2011 04:33:43 GMT
Hi David,

Right,  It's not a new problem.

ejbJarinfo.moduleId is the module file name without the ext (moduleId used
to be the moduleURI.toString,  but it's changed the name without ext because
of the global JNDI).    For EJBModuleBuilder here, it does not use
abstractName at all from the begining.

That's way I think it's safe to modified it to moduleURI + Type.   At least,
 it wont' bring new issues.

I agree that we should use abstract name plus something identical in module
to avoid the conflict completely.

On Sat, Jun 18, 2011 at 5:09 AM, David Jencks <david_jencks@yahoo.com>wrote:

> This REALLY needs a jira explaining what the problem is.  I don't see how
> this change by itself can be correct.  Doesn't there need to be a
> corresponding change somewhere so the ejb module policyContextID is this new
> value?
>
> Also I think that this produces policyContextIds that are just moduleName +
> suffix whereas they are supposed to be the entire abstract name of the
> module so different apps can't conflict.  This might not be a new problem --
> I'm not sure what the ejbJarInfo.moduleId was.
>
> thanks
> david jencks
>
> On Jun 16, 2011, at 2:06 AM, genspring@apache.org wrote:
>
> > Author: genspring
> > Date: Thu Jun 16 09:06:06 2011
> > New Revision: 1136332
> >
> > URL: http://svn.apache.org/viewvc?rev=1136332&view=rev
> > Log:
> > Reduce the chance of  policy id conflict for ejbmodule.
> >
> > Modified:
> >
>  geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java
> >
> > Modified:
> geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java
> > URL:
> http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java?rev=1136332&r1=1136331&r2=1136332&view=diff
> >
> ==============================================================================
> > ---
> geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java
> (original)
> > +++
> geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java
> Thu Jun 16 09:06:06 2011
> > @@ -1195,8 +1195,9 @@ public class EjbModuleBuilder implements
> >         ejbDeploymentBuilder.addEjbModuleDependency(ejbModuleGBeanData);
> >
> >         // add the Jacc permissions to the ear
> > +        String policyContextID =
> ejbModule.getModuleURI()+"_Type_"+ejbModule.getType().getName();
> >         ComponentPermissions componentPermissions =
> ejbDeploymentBuilder.buildComponentPermissions();
> > -
>  earContext.addSecurityContext(ejbModule.getEjbInfo().getEjbJarInfo().moduleId,
> componentPermissions);
> > +        earContext.addSecurityContext(policyContextID,
> componentPermissions);
> >
> >         setMdbContainerIds(earContext, ejbModule, ejbModuleGBeanData);
> >
> >
> >
>
>


-- 
Shawn

Mime
View raw message