geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <david_jen...@yahoo.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:56:04 GMT
Hi Shawn,

thanks for opening the jira.  The abstract names ought to be different since they should have
something like j2eeType=WebModule or j2eeType=EJBModule.  We might need to use something like
my patch anyway to combine the servlet and ejb permissions for the module.war with ejbs inside.
 Either that or come up with a longer ejb module name that has WebModule=module,j2eeType=EJBModule,name=module.

If I understand your example correctly my patch will result in combining the permissions for
the ejbs in module.jar and module.war, is that correct?  That might still be better than losing
the ejb permissions entirely until we can fix this better.

thanks
david jencks

On Jun 17, 2011, at 9:33 PM, Shawn Jiang wrote:

> 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