Details

    • Similar Issues:
      Show 10 results 

      Description

      JavaMail cannot be used as it was in JBossAS 6 and earlier.

      1) I tried as in JBoss 6:
      @Resource(mappedName = "java:Mail")
      private Session mailer;

      ... and got this logging info within the Arquillian tests:
      11:12:08,454 INFO [org.jboss.as.server.controller] (pool-1-thread-48) Deployment of "test.ear.ear" was rolled back with failure message

      {"Services with missing/unavailable dependencies" => ["jboss.naming.context.java.comp.\"test.ear\".test.KundenverwaltungListener.\"env/de.swe2.kundenverwaltung.service.KundenverwaltungListener/mailer\".jboss.deployment.subunit.\"test.ear.ear\".\"test.jar\".component.KundenverwaltungListener.8","jboss.deployment.subunit.\"test.ear.ear\".\"test.jar\".component.Dao.START","jboss.deployment.subunit.\"test.ear.ear\".\"test.jar\".component.KundenverwaltungListener.START","jboss.deployment.subunit.\"test.ear.ear\".\"test.jar\".component.KundenverwaltungResourceImpl.START","jboss.deployment.subunit.\"test.ear.ear\".\"test.jar\".component.ValidationService.START","jboss.deployment.subunit.\"test.ear.ear\".\"test.jar\".component.Kundenverwaltung.START","jboss.deployment.subunit.\"test.ear.ear\".\"test.jar\".component.Artikelverwaltung.START","jboss.deployment.subunit.\"test.ear.ear\".\"test.jar\".component.FileStore.START","jboss.deployment.subunit.\"test.ear.ear\".\"test.jar\".component.RolesService.START","jboss.deployment.subunit.\"test.ear.ear\".\"test.jar\".component.BestellverwaltungResourceImpl.START","jboss.deployment.subunit.\"test.ear.ear\".\"test.jar\".component.PasswordService.START","jboss.deployment.subunit.\"test.ear.ear\".\"test.jar\".jndiDependencyService","jboss.deployment.subunit.\"test.ear.ear\".\"test.jar\".component.Bestellverwaltung.START"]}

      11:12:08,468 INFO [org.jboss.jpa] (MSC service thread 1-1) stopping Persistence Unit Service 'test.ear.ear/test.jar#swe2Persistence'
      11:12:08,470 INFO [org.jboss.weld] (MSC service thread 1-1) Stopping weld service

      2) I tried
      @Resource
      private Session mailer;

      ... and got this logging info within the Arquillian tests:
      11:09:20,085 INFO [org.jboss.as.server.controller] (pool-1-thread-46) Deployment of "test.ear.ear" was rolled back with failure message

      {"Services with missing/unavailable dependencies" => ["jboss.deployment.subunit.\"test.ear.ear\".\"test.jar\".component.KundenverwaltungListener.START"]}

      11:09:20,094 INFO [org.jboss.jpa] (MSC service thread 1-2) stopping Persistence Unit Service 'test.ear.ear/test.jar#swe2Persistence'
      11:09:20,098 INFO [org.jboss.weld] (MSC service thread 1-2) Stopping weld service

        Issue Links

          Activity

          Hide
          David Lloyd
          added a comment -

          See my comments on AS7-1375 - once you have this solved then why don't you go ahead with a pull request and we'll start the first round of code review.

          Thanks!

          Show
          David Lloyd
          added a comment - See my comments on AS7-1375 - once you have this solved then why don't you go ahead with a pull request and we'll start the first round of code review. Thanks!
          Hide
          Tomaz Cerar
          added a comment -

          mail subsystem is implemented and pull request sent

          Show
          Tomaz Cerar
          added a comment - mail subsystem is implemented and pull request sent
          Hide
          Tomaz Cerar
          added a comment -

          As found by code review, there are few things missing in current impl.
          main missing capability is to define credentials per server.

          Show
          Tomaz Cerar
          added a comment - As found by code review, there are few things missing in current impl. main missing capability is to define credentials per server.
          Hide
          Tomaz Cerar
          added a comment -

          new config with all options and ability to define credentials per server/protocol looks like this:

           <subsystem xmlns="urn:jboss:domain:mail:1.0">
                      <mail-session jndi-name="java:/Mail" >
                          <smtp-server address="localhost" port="9999">
                                 <login name="nobody" password="pass"/>
                          </smtp-server>
                          <pop3-server address="example.com" port="1234"/>
                          <imap-server address="example.com" port="432">
                              <login name="nobody" password="pass"/>
                          </imap-server>
                     </mail-session>
                      <mail-session jndi-name="java:jboss/mail/Default" >
                          <smtp-server address="localhost" port="25"/>
                      </mail-session>
                  </subsystem>
          
          
          Show
          Tomaz Cerar
          added a comment - new config with all options and ability to define credentials per server/protocol looks like this: <subsystem xmlns= "urn:jboss:domain:mail:1.0" > <mail-session jndi-name= "java:/Mail" > <smtp-server address= "localhost" port= "9999" > <login name= "nobody" password= "pass" /> </smtp-server> <pop3-server address= "example.com" port= "1234" /> <imap-server address= "example.com" port= "432" > <login name= "nobody" password= "pass" /> </imap-server> </mail-session> <mail-session jndi-name= "java:jboss/mail/Default" > <smtp-server address= "localhost" port= "25" /> </mail-session> </subsystem>
          Hide
          Tomaz Cerar
          added a comment -

          already in upstream master

          Show
          Tomaz Cerar
          added a comment - already in upstream master

            People

            • Assignee:
              Tomaz Cerar
              Reporter:
              Juergen Zimmermann
            • Votes:
              2 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: