JSPWiki
  1. JSPWiki
  2. JSPWIKI-728

JNDI mail context lookup fails with JBoss 5.1

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Invalid
    • Affects Version/s: 2.8.4
    • Fix Version/s: None
    • Labels:
      None
    • Environment:

      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 ); }

        Activity

          People

          • Assignee:
            Harry Metske
            Reporter:
            Malcolm Kendall
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development