6 Replies Latest reply on Mar 29, 2006 9:09 PM by elkner

    @Service + @Management + @Remote + @SecurityDomain?

    elkner

      Is this bean (@Service + @Management + @Remote + @SecurityDomain) possible ?

      For my case, @Service + @Management + @Remote works, but as soon as I add @SecurityDomain (since I do not want, that unauthenticated users are allowed to invoke service methods), I get an exception like:

      2006-03-28 00:03:03,649 WARN [ScannerThread:org.jboss.system.ServiceController:424] - Problem starting service jboss.j2ee:ear=foo.ear,jar=foo-ejb-0.0.9a.jar,name=UpdateService,service=EJB3,type=ManagementInterface
      javax.ejb.EJBAccessException: Authentication failure
      at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.handleGeneralSecurityException(Ejb3AuthenticationInterceptor.java:46)
      at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:71)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)

      The bean in question (UpdateService) is annotated with @Service + @SecurityDomain("bla"), the IF it implements with @Remote, @Management.

      @Service is required, since I need a singleton.
      @Management is required, since I want the "service" get started automatically at deployment/server startup (starts a TimerTask to do stuff in a cronjob manner)
      @Remote to make it easy, to access the "service" from a remote client
      @SecurityDomain because of @Remote ;-)

      Any hints ?