<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Latest posts for the topic "Jobs not getting invoked when ejb is secured"]]></title>
		<link>http://forums.terracotta.org/forums/posts/list/17.page</link>
		<description><![CDATA[Latest messages posted in the topic "Jobs not getting invoked when ejb is secured"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>Jobs not getting invoked when ejb is secured</title>
				<description><![CDATA[ I am using quartz 1.6.4 and websphere 6.1.
I have jobs defined as ejb.At trigger time, the JobSessionInvoker (normal java class which extends QuartzJobBean ) looks up for the job(ejb) and executes it .This works fine if the ejb is not secure.
If the job is made secured, it is not getting invoked and the below exception is thrown

[7/7/10 11:53:20:919 IST] 0000083f SecurityColla A   SECJ0053E: Authorization failed for /UNAUTHENTICATED while invoking (Home)client/ClientJobSessionBean create:2 securityName: /UNAUTHENTICATED;accessID: UNAUTHENTICATED is not granted any of the required roles: User 
[7/7/10 11:53:20:920 IST] 0000083f JobRunShell   I org.quartz.core.JobRunShell run Job statelessJobGroup.statelessJob threw a JobExecutionException: 
                                 org.quartz.JobExecutionException: CORBA NO_PERMISSION 0x0 No; nested exception is: 
	org.omg.CORBA.NO_PERMISSION: java.rmi.AccessException:  ; nested exception is: 
	com.ibm.websphere.csi.CSIAccessException: SECJ0053E: Authorization failed for /UNAUTHENTICATED while invoking (Home)client/ClientJobSessionBean create:2 securityName: /UNAUTHENTICATED;accessID: UNAUTHENTICATED is not granted any of the required roles: User   vmcid: 0x0  minor code: 0  completed: No [See nested exception: java.rmi.AccessException: CORBA NO_PERMISSION 0x0 No; nested exception is: 
	org.omg.CORBA.NO_PERMISSION: java.rmi.AccessException:  ; nested exception is: 
	com.ibm.websphere.csi.CSIAccessException: SECJ0053E: Authorization failed for /UNAUTHENTICATED while invoking (Home)client/ClientJobSessionBean create:2 securityName: /UNAUTHENTICATED;accessID: UNAUTHENTICATED is not granted any of the required roles: User   vmcid: 0x0  minor code: 0  completed: No]
	at .JobSessionInvoker.executeInternal(JobSessionInvoker.java:70)
	at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86)
	at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
	at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:525)
Caused by: java.rmi.AccessException: CORBA NO_PERMISSION 0x0 No; nested exception is: 
	org.omg.CORBA.NO_PERMISSION: java.rmi.AccessException:  ; nested exception is: 
	com.ibm.websphere.csi.CSIAccessException: SECJ0053E: Authorization failed for /UNAUTHENTICATED while invoking (Home)client/ClientJobSessionBean create:2 securityName: /UNAUTHENTICATED;accessID: UNAUTHENTICATED is not granted any of the required roles: User   vmcid: 0x0  minor code: 0  completed: No
	at com.ibm.CORBA.iiop.UtilDelegateImpl.mapSystemException(UtilDelegateImpl.java:269)
	at com.ibm.CORBA.iiop.UtilDelegateImpl.wrapException(UtilDelegateImpl.java:752)
	at javax.rmi.CORBA.Util.wrapException(Util.java:296)
	at .jobsession._JobSessionHome_Stub.create(Unknown Source)
	at .JobSessionInvoker.getJobSessionBean(JobSessionInvoker.java:111)
	at .JobSessionInvoker.executeInternal(JobSessionInvoker.java:55)
	... 3 more
Caused by: org.omg.CORBA.NO_PERMISSION: java.rmi.AccessException:  ; nested exception is: 
	com.ibm.websphere.csi.CSIAccessException: SECJ0053E: Authorization failed for /UNAUTHENTICATED while invoking (Home)client/ClientJobSessionBean create:2 securityName: /UNAUTHENTICATED;accessID: UNAUTHENTICATED is not granted any of the required roles: User   vmcid: 0x0  minor code: 0  completed: No
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:67)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:522)
	at com.ibm.rmi.util.ProxyUtil.copyObject(ProxyUtil.java:341)
	at com.ibm.rmi.util.ProxyUtil.invokeWithClassLoaders(ProxyUtil.java:757)
	at com.ibm.CORBA.iiop.ClientDelegate.invoke(ClientDelegate.java:1161)
	at $Proxy147.create(Unknown Source)
	... 6 more


How can i add security to my JobSessionInvoker??
 ]]></description>
				<guid isPermaLink="true">http://forums.terracotta.org/forums/posts/list/3918.page#21212</guid>
				<link>http://forums.terracotta.org/forums/posts/list/3918.page#21212</link>
				<pubDate><![CDATA[Wed, 7 Jul 2010 00:34:00]]> GMT</pubDate>
				<author><![CDATA[ kavyn]]></author>
			</item>
			<item>
				<title>Re:Jobs not getting invoked when ejb is secured</title>
				<description><![CDATA[ 
You will need to have the job that is invoking the EJB authenticate the thread before attempting to invoke the EJB (because the EJB apparently has authentication requirements configured for it).

This is typically done by passing credentials during the creation of the InitialContext before looking up the EJB Home interface.  Specifics vary from container to container.]]></description>
				<guid isPermaLink="true">http://forums.terracotta.org/forums/posts/list/3918.page#21262</guid>
				<link>http://forums.terracotta.org/forums/posts/list/3918.page#21262</link>
				<pubDate><![CDATA[Thu, 8 Jul 2010 22:07:11]]> GMT</pubDate>
				<author><![CDATA[ jhouse]]></author>
			</item>
			<item>
				<title>Re:Jobs not getting invoked when ejb is secured</title>
				<description><![CDATA[ Hi jhouse,
Thanks for your reply..

We tried setting the credentials and principles.
It works fine with the first worker.But for the second time invokation i am getting the same /UNAUTHENTICATED exception.
We also found the bug for the same in quartz <font color='blue'>http://jira.opensymphony.com/browse/QUARTZ-777</font>
If we try the work around given in the bug report of setting

org.quartz.threadPool.threadCount to 1
org.quartz.simpl.SimpleThreadPool. 

It works,but we dont want to use SimpleThreadPool we have configured our own Workmanager as follows

<bean id="workManagerTaskExecutor" class="org.springframework.scheduling.commonj.WorkManagerTaskExecutor">
		<property name="workManagerName" value="wm/workManagerRef"/>
		<property name="resourceRef" value="true"/>
	</bean>

How can we specify the thread pool class in quartz.properties as the workmanger that we have configured..??

]]></description>
				<guid isPermaLink="true">http://forums.terracotta.org/forums/posts/list/3918.page#21268</guid>
				<link>http://forums.terracotta.org/forums/posts/list/3918.page#21268</link>
				<pubDate><![CDATA[Thu, 8 Jul 2010 22:48:01]]> GMT</pubDate>
				<author><![CDATA[ kavyn]]></author>
			</item>
	</channel>
</rss>