[jboss-jira] [JBoss JIRA] (AS7-6088) AS7 SecurityException java.lang for deploying EJB with implements Runnable

Chao Wang (JIRA) jira-events at lists.jboss.org
Thu Dec 6 03:06:21 EST 2012


    [ https://issues.jboss.org/browse/AS7-6088?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12739842#comment-12739842 ] 

Chao Wang commented on AS7-6088:
--------------------------------

I accidentally found one similar thread when I tried to reproduce exception : https://community.jboss.org/thread/205228

and the EJB3.1 specification restrict:

{quote}
  The enterprise bean must not attempt to manage threads. The enterprise bean must not attempt
to start, stop, suspend, or resume a thread, or to change a thread’s priority or name. The enter-
prise bean must not attempt to manage thread groups.
  These functions are reserved for the EJB container. Allowing the enterprise bean to manage threads
would decrease the container’s ability to properly manage the runtime environment.
{quote}

[~dlmiles] Could you follow this article : http://www.adam-bien.com/roller/abien/entry/conveniently_transactionally_and_legally_starting  try with java.util.concurrent.Executor approach ?

                
> 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



More information about the jboss-jira mailing list