1 Reply Latest reply on Oct 22, 2008 4:12 AM by Wolfgang Knauf

    Secure EJBs using Annotations

    Jamie Johnson Newbie

      Looking at the EJB 3.0 Trail the SecureCalculator.java file imports the org.jboss.annotation.security.SecurityDomain annotation but I would like to try and keep my deployments app server agnostic, is there a way to do the same operation without this annotaiton?

        • 1. Re: Secure EJBs using Annotations
          Wolfgang Knauf Master

          Hi,

          you can achieve this by adding a file "jboss.xml" to your EJB project, with this content:

          <?xml version="1.0" encoding="UTF-8"?>
          <!DOCTYPE jboss PUBLIC
           "-//JBoss//DTD JBOSS 4.2//EN"
           "http://www.jboss.org/j2ee/dtd/jboss_4_2.dtd">
          
          <jboss>
           <security-domain>nameofsecuritydomain</security-domain>
          </jboss>


          Hope this helps

          Wolfgang