Uploaded image for project: 'Seam 2'
  1. Seam 2
  2. JBSEAM-4080

Problems with Remote EJB as seam component on WebLogic 10.0 MP1/10.3

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Rejected
    • Affects Version/s: 2.0.2.SP1, 2.1.1.GA
    • Fix Version/s: None
    • Component/s: EJB3
    • Labels:
      None

      Description

      There are two problems using Remote EJB as Seam Component on WebLogic 10.0 MP0/10.3.

      1) Seam Interceptos(BijectionInterceptro etc.) aren't executed.

      Because of SessionBeanInterceptor can't initizalize Remote EJB on WebLogic 10.0/10.3, seam interceptors aren't executed. so it cause some problems, for example failure of injection by @In.

      2) Cannot access to Unserializable Application Context Component from Remote EJB.

      I don't know why, but when access to ServletContext data in EJB Remote Object on WebLogic, serialize/deserialize is performed.

      In my reproduce app, there is NotSerializable application context component which injected at Remote EJB Component. so it cause NotSerializableException as follows.


      java.io.NotSerializableException: org.jboss.seam.example.remoteejb.AppData
      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156)
      at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
      at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
      at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
      at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
      at weblogic.common.internal.PassivationUtils.toByteArray(PassivationUtils.java:33)
      at weblogic.common.internal.PassivationUtils.toByteArray(PassivationUtils.java:24)
      at weblogic.common.internal.PassivationUtils.copy(PassivationUtils.java:64)
      at weblogic.servlet.internal.AttributeWrapper.getObject(AttributeWrapper.java:100)
      at weblogic.servlet.internal.AttributeWrapper.getObject(AttributeWrapper.java:52)
      at weblogic.servlet.internal.AttributesMap.get(AttributesMap.java:62)
      at weblogic.servlet.internal.WebAppServletContext.getAttribute(WebAppServletContext.java:482)
      at org.jboss.seam.servlet.ServletApplicationMap.get(ServletApplicationMap.java:54)
      at org.jboss.seam.contexts.BasicContext.get(BasicContext.java:49)
      at org.jboss.seam.contexts.Contexts.lookupInStatefulContexts(Contexts.java:219)
      at org.jboss.seam.Component.getInstance(Component.java:1949)
      at org.jboss.seam.Component.getInstance(Component.java:1944)
      at org.jboss.seam.Component.getInstanceInAllNamespaces(Component.java:2311)
      at org.jboss.seam.Component.getValueToInject(Component.java:2263)
      at org.jboss.seam.Component.injectAttributes(Component.java:1703)
      at org.jboss.seam.Component.inject(Component.java:1521)
      at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.--

      I created a patch for fix these problems.
      I describe how I fix.

      Problem 1)
      In weblogic, it seems that EJB Remote class is generated by weblogic ejb compiler, and InvocationContext#getTarget() return a class which don't have @Name annotation. So SessionBeanInterceptor can't initizalize this class correctly.

      I found the super class of the generated class has @Name annotation.
      so I fixed handling target class.

      Problem 2)
      I don't know why weblogic serialize/deserialize object when access to ServletContext in EJB Remote Object, it comes from the ContextClassLoader difference.

      In EJB Remote Object, the ContextClassLoader is EAR ClassLoader.
      In contrast, WAR ClassLoader is used when accessed from JSF,
      so I set WAR ClassLoader to ContextClassLoader before calling InvocationContext#proceed().

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                pmuir Pete Muir
                Reporter:
                wadahiro Hiroyuki Wada
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: