[
https://issues.jboss.org/browse/AS7-6088?page=com.atlassian.jira.plugin.s...
]
Darryl Miles commented on AS7-6088:
-----------------------------------
Thanks for the link to spec. Did this restriction exist before EJB3.1 ?
Even with this advice there is still a bug in that if you define 2 interfaces and one is
Runnable it does not cause the SecurityException the bug would be the lack of consistency
(and also the message not being very clear about the problem, i.e. it would be useful to
contain the full class name trying to be accessed with an indication that access to the
package is the cause of the security restriction).
Having digested the comment I do not think Executor pattern fits well for a long running
thread. Is there a container managed service for managing real threads ? i.e. with
priority and name and possibly thread groups. The code originally was an MBean or some
service interface but JBoss took it away so it was converted for AS7 into something that
worked.
AS7 SecurityException java.lang for deploying EJB with implements
Runnable
--------------------------------------------------------------------------
Key: AS7-6088
URL:
https://issues.jboss.org/browse/AS7-6088
Project: Application Server 7
Issue Type: Bug
Components: EJB
Environment: AS 7.1.1.Final Standalone, Linux 32bit
Reporter: Darryl Miles
Attachments: jboss.bugtest-EJBTHREE-2291.zip
If you defined an EJB with@
@Startup
@Singleton
public class ModuleMain implements Runnable { ...
This triggers a SecurityException: Prohibitied package name: java.lang
during the deploy and fails to deploy.
If you change it to "implements SomeUserDefinedInterface" it deploys ok.
If you change it to "implements Runnable,SomeUserDefinedInterface" it deploys
ok.
I will attach JBoss AS7 log output during the deploy and also a Maven project you can
build a working testcase from.
In this project you should take a look at the class ModuleMain.java I have included the
log output in there as well as some notes on the minimum change needed to workaround the
problem or try other scenarios related (i.e. modifying only the declared implements
interface list for the class ModuleMain)
I have marked bug with EJB module as this is an EJB deployment issue I'm sure that
module owner can reassign if it is the wrong component.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira