Uploaded image for project: 'Axis2'
  1. Axis2
  2. AXIS2-4753

Make EJBUtil multi-thread aware

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.5.1
    • None
    • databinding
    • None
    • WebLogic

    Description

      We found that we had problems integrating Axis2 with WebLogic in that we couldn't re-use any of the EJB receiver code apparently because the security established at InitialContext creation (org.apache.axis2.rpc.receivers.ejb.EJBUtil) was then lost when org.apache.axis2.rpc.receivers.ejb.EJBUtil.EJBClientWorker invoked its run method in a separate thread for the EJB service, causing a WebLogic security error invoking the service. We checked with Oracle and they feel it's most likely that the separate threads are the cause as WLS doesn't pass/propagate subjects across threads. Thus the second thread that does the actual invocation of the service doesn't have the authentication done in the first thread when the InitialContext is created, which is successfully validated by our login module.

      We coded our own receiver to avoid this additional threading—essentially duplicating the Axis2 functionality. I've been told that for EJB environments that threading should not be used, leaving it to the container environment to manage.


      Had confirmation from Martin Gainty and request to open this JIRA case:
      "
      yep the statics of EJBUtil will not work in a multi-threaded environment as seen here

      public class EJBUtil {
      public static final java.lang.String EJB_JNDI_NAME = "beanJndiName";
      "

      Attachments

        Activity

          People

            Unassigned Unassigned
            wwalsh William Walsh
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: