0 Replies Latest reply on Mar 9, 2006 1:50 PM by 3004

    WLS MailSession Problems in a cluster

    3004
      I have a WLS 9.1 cluster of 2 machines. My EJB's are targetted to both
                machines in the cluster, and I have a single WLS MailSession that is
                targetted to both machines in the cluster.
                
                
                One of the EJB's in the application is responsible for sending emails.
                Every so often I get a
                NotSerializableException when the this EJB looks up the mail session. After
                some
                diagnosis it appears that every once in a while the JNDI lookup for the mail
                session returns the MailSession from the opposite machine in the cluster:
                IE: the EJB running on server 1, gets the MailSession from server 2, and
                vice-versa.
                
                
                When the same EJB is running in a non clustered env, there are no problems.
                Furthermore, the problem in the cluster is intermittent - sometimes the
                lookup
                succeeds and the EJB gets a handle to the local MailSession object, and
                sometimes it fails.
                
                
                Has anyone else experienced this problem? Is this a known problem? If so,
                are there any patches for it?
                
                
                Thanks,
                
                
                Brett
                
                
                The exception is:
                
                
                javax.naming.ConfigurationException [Root exception is
                java.rmi.MarshalException: error marshalling return; nested exception is: \n
                java.io.NotSerializableException: javax.mail.Session]\n at
                weblogic.jndi.internal.ExceptionTranslator.toNamingException(ExceptionTranslator.java:46)\n
                at
                weblogic.jndi.internal.ExceptionTranslator.toNamingException(ExceptionTranslator.java:78)\n
                at
                weblogic.jndi.internal.WLContextImpl.translateException(WLContextImpl.java:421)\n
                at
                weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:377)\n at
                weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:362)\n at
                javax.naming.InitialContext.lookup(InitialContext.java:351)\n at
                com.certapay.ejb.Mailer.send(Mailer.java:55)