[ 
https://issues.apache.org/jira/browse/GERONIMO-4801?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12749794#action_12749794
 ] 

David Jencks commented on GERONIMO-4801:
----------------------------------------

This patch looks to me as if it will work but it may be more complicated than 
necessary.  The earContext contextIDToPermissionsMap is returned from 
earContext rather than copied, and the gbeanData attributes are also not 
copied.  So the map from the EARContext is shared between the ear context and 
the gbeandata.  Therefore if there's a second call to create  the gbean, you 
don't need to do anything at all, just check that the gbean is already present.

On the other hand, if, after checking that the gbean is not present, we get a 
GBeanAlreadyExists exception, something is definitely wrong and we should throw 
a deployment exception, as we do now.

> it says "JACC manager gbean already present" when i deploy PlantsByWebSphere  
> sample
> ------------------------------------------------------------------------------------
>
>                 Key: GERONIMO-4801
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-4801
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: security
>    Affects Versions: 2.2
>         Environment: windows xp sp2(x86)
> jdk6
>            Reporter: Bin He
>            Assignee: Ivan
>         Attachments: Geronimo-4801.patch, PlantsByWebSphere.7z, 
> sample-datasource.7z
>
>
> 1、start server 
> 2、deploy  sample-datasource sample
> 3、deploy  PlantsByWebSphere sample   but it   says:(but this sample can run 
> well)
> 2009-08-19 10:28:52,370 ERROR [EjbModuleBuilder] 
> GeronimoSecurityBuilderImpl.addGBeans() failed: JACC manager gbean already 
> present
> org.apache.geronimo.common.DeploymentException: JACC manager gbean already 
> present
>       at 
> org.apache.geronimo.security.deployment.GeronimoSecurityBuilderImpl.buildJaccManager(GeronimoSecurityBuilderImpl.java:224)
>       at 
> org.apache.geronimo.security.deployment.GeronimoSecurityBuilderImpl.addGBeans(GeronimoSecurityBuilderImpl.java:150)
>       at 
> org.apache.geronimo.openejb.deployment.EjbModuleBuilder.addGBeans(EjbModuleBuilder.java:825)
>       at 
> org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:652)
>       at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:257)
>       at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:136)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
>       at java.lang.reflect.Method.invoke(Method.java:599)
>       at 
> org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
>       at 
> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:130)
>       at 
> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:850)
>       at 
> org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:237)
>       at 
> org.apache.geronimo.deployment.plugin.local.AbstractDeployCommand.doDeploy(AbstractDeployCommand.java:116)
>       at 
> org.apache.geronimo.deployment.plugin.local.DistributeCommand.run(DistributeCommand.java:61)
>       at java.lang.Thread.run(Thread.java:735)
> Caused by: org.apache.geronimo.kernel.GBeanAlreadyExistsException: 
> com.ibm.wasce.samples/pbw/2.1.1.2/car?J2EEApplication=com.ibm.wasce.samples/pbw/2.1.1.2/car,j2eeType=JACCManager,name=JACCManager
>       at 
> org.apache.geronimo.kernel.config.Configuration.addGBean(Configuration.java:626)
>       at 
> org.apache.geronimo.deployment.DeploymentContext.addGBean(DeploymentContext.java:186)
>       at 
> org.apache.geronimo.security.deployment.GeronimoSecurityBuilderImpl.buildJaccManager(GeronimoSecurityBuilderImpl.java:222)
>       ... 16 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to