geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <david_jen...@yahoo.com>
Subject Re: Genimo + Quartz = No Security Context
Date Thu, 03 Apr 2008 16:03:18 GMT
I think if you moved to geronimo 2.1 we would provide a security  
context with no permissions to the quartz thread.  If you used a  
remote connection to the ejb from the quartz task then you should get  
a security context.

If you used an ejb timer it would handle this.
There's a (proposed?) ee conncurrency spec that we are working on  
implementing that should also provide means to supply a security  
context.

Do you need access to the ejb to be secured or do you just want it to  
work :-)
Is moving to geronimo 2.x an option for you?

thanks
david jencks

On Apr 3, 2008, at 7:46 AM, ApolloX wrote:

>
> Hi All,
>
> I've added quartz scheduling tool my Geronimo 1.2 server.  I've  
> created
> servlet with start-on-startup property set in the web xml so that  
> on server
> start, the servlet issues a call to a session bean that initializes  
> the
> scheduler on the EJB tier/level.
>
> The scheduling mechanism starts and works properly, the problem I'm  
> having
> is tasks in the schedular are unable to access CMP2 entity beans.  Any
> attempt to access the persistent layer ends with a  
> NullPointerException in
> the geronimo security context manager as show below.
>
> Is there a way to provide the tasks in the schedule with a proper  
> context so
> that the processes can run?  I checked and the initial call to  
> start the
> scheduler has access to this layer, but this information is not  
> available to
> the threads the scheduler spawns.
>
>
> Caused by: java.lang.NullPointerException
> 	at
> org.apache.geronimo.security.ContextManager.getCurrentContext 
> (ContextManager.java:167)
> 	at
> org.apache.openejb.security.EjbSecurityInterceptor.invoke 
> (EjbSecurityInterceptor.java:65)
> 	at
> org.apache.openejb.security.EjbRunAsInterceptor.invoke 
> (EjbRunAsInterceptor.java:50)
> 	at
> org.apache.openejb.security.PolicyContextHandlerEJBInterceptor.invoke( 
> PolicyContextHandlerEJBInterceptor.java:64)
> 	at
> org.apache.openejb.naming.ComponentContextInterceptor.invoke 
> (ComponentContextInterceptor.java:51)
> 	at
> org.apache.openejb.ConnectionTrackingInterceptor.invoke 
> (ConnectionTrackingInterceptor.java:56)
> 	at
> org.apache.openejb.entity.EntityInstanceInterceptor.invoke 
> (EntityInstanceInterceptor.java:110)
> 	at
> org.apache.openejb.entity.cmp.InTxCacheInterceptor.invoke 
> (InTxCacheInterceptor.java:60)
> 	at
> org.apache.openejb.transaction.TransactionContextInterceptor.invoke 
> (TransactionContextInterceptor.java:50)
> 	at org.apache.openejb.transaction.TxRequired.invoke 
> (TxRequired.java:74)
> 	at
> org.apache.openejb.transaction.TransactionPolicyInterceptor.invoke 
> (TransactionPolicyInterceptor.java:50)
> 	at
> org.apache.openejb.NoConnectionEnlistingInterceptor.invoke 
> (NoConnectionEnlistingInterceptor.java:68)
> 	at
> org.apache.openejb.SystemExceptionInterceptor.invoke 
> (SystemExceptionInterceptor.java:35)
> 	at
> org.apache.openejb.entity.cmp.DefaultCmpEjbContainer.invoke 
> (DefaultCmpEjbContainer.java:150)
> 	at
> org.apache.openejb.entity.cmp.DefaultCmpEjbContainer$ 
> $FastClassByCGLIB$$e128ff0b.invoke(<generated>)
> 	at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
> 	at
> org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke 
> (FastMethodInvoker.java:38)
> 	at
> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke 
> (GBeanOperation.java:122)
> 	at
> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke 
> (GBeanInstance.java:820)
> 	at org.apache.geronimo.gbean.runtime.RawInvoker.invoke 
> (RawInvoker.java:57)
> 	at
> org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke 
> (RawOperationInvoker.java:35)
> 	at
> org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept 
> (ProxyMethodInterceptor.java:96)
> 	at
> org.apache.openejb.BmpEjbContainer$$EnhancerByCGLIB$$821fbd47.invoke 
> (<generated>)
> 	at
> org.apache.openejb.AbstractEjbDeployment.invoke 
> (AbstractEjbDeployment.java:195)
> 	at
> org.apache.openejb.proxy.EJBMethodInterceptor.intercept 
> (EJBMethodInterceptor.java:145)
> -- 
> View this message in context: http://www.nabble.com/Genimo-%2B- 
> Quartz-%3D-No-Security-Context-tp16467530s134p16467530.html
> Sent from the Apache Geronimo - Users mailing list archive at  
> Nabble.com.
>


Mime
View raw message