Uploaded image for project: 'JSPWiki'
  1. JSPWiki
  2. JSPWIKI-728

JNDI mail context lookup fails with JBoss 5.1

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Invalid
    • 2.8.4
    • None
    • None
    • All

    Description

      Use of "java:comp/env" does not work with JBoss JNDI.
      Modify MailUtil.getJNDIMailSession() to

      Context initCtx = new InitialContext();
      if (jndiName.startsWith( "java:" ))

      { session = (Session) initCtx.lookup( jndiName ); }

      else

      { Context ctx = (Context) initCtx.lookup( JAVA_COMP_ENV ); session = (Session) ctx.lookup( jndiName ); }

      Attachments

        Activity

          People

            metskem Harry Metske
            edmiikk Malcolm Kendall
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: