5 Replies Latest reply on Sep 4, 2007 10:25 PM by changemylife

    ejb-jar.xml file

    pvelarde

      Hi all,

      Does ejb3.0 have ejb-jar.xml file ¿?

      thanks very much,

      pedro.

        • 1. Re: ejb-jar.xml file
          itsme

          not if you not wan't one

          /sandor/

          • 2. Re: ejb-jar.xml file
            pvelarde

            Hi and thanks for your quick answer,

            Ok, really I dont know if I need it. I'm adding JAAS security in my EJB3.0 Application and I read in the forum I must establish the security domain in the jboss.xml Application file but in the ejb-jar.xml file too. But how can I do it¿? have any sample¿?

            thanks very much again.

            pedro.

            • 3. Re: ejb-jar.xml file
              itsme

              We don't use them, but as far as I understand it all can be declared by annotations on class or method level. Have a look at http://java.sun.com/javaee/5/docs/api/ and watch out for

              javax.annotation.security
              - package.

              The roles itself must be defined in login-config.xml in conf-dir of your server configuration (i.e. <jboss-install-dir>/server/default/conf). There are different ways for specifying usernames, passwords and roles. The simplest one is by using a properties file. If your read the login-config.xml you'll probalby able to understand the configuration needs.

              Hope this helps. Regards.

              /sandor/

              • 4. Re: ejb-jar.xml file
                pvelarde

                thanks very much sandor, i'll try.

                see you.

                • 5. Re: ejb-jar.xml file
                  changemylife

                  1. If you need ejb-jar.xml, you can add it into your app.
                  2. You add SecurityDomain into jboss.xml. Ex:

                  <security-domain>MyDomain</security-domain>

                  3. Enter the jboss-install-dir>/server/default/conf to add your SecurityDomain (MyDomain).
                  Hope this helps. Regards.