3 Replies Latest reply on Jun 9, 2008 12:02 PM by Christian Lauer

    Seam on WebLogic 10, the facts, the solutions, the open issues

    Christian Lauer Newbie

      Meanwhile a couple of month passed after I started to get the seam framework running on BEA WebLogic Server.

      As the framework wasn't compatible at all in the beginning because of problem with transient methods. I've found out that this happens whenever a method with varargs was member of a bean, I've opened a support case to get this problem fixed after it was a known bug for about a year. Fortunately the support engineer was able to fix this bug quickly which was at first only compatible with JRockit VMs. I've helped BEA to get this issue fixed for SUN VMs too which was adapted finally. Unfortunately this CR seems not to be officially available.
      Once I got past this issue, I've found out that the Seam timer component still doesn't deploy on WLS 10MP1. After a lot of investigations and test I've discovered that the problem is related to another Java SE 5 feature. The problem here is that methods which implement generic interfaces double these methods. One with generic arguments (java.lang.Object) one with the well defined arguments. In case a method has a generic return value this method exists with the well defined type and with return type java.lang.Object together with the volatile modifier added. This is a problem in case a method has a generic return type and none generic arguments. In this case the signature of both enlisted methods in reflection are absolutely equal. Only the return type and the modifiers differ. The problem in the BEA EJB3 compiler is that they seem to filter out methods with volatile modifiers. Unfortunately they also seem to filter out methods with duplicate signatures but don't consider the return type and the modifiers when doing this. This seems not to happen for JRockit Machines, because their reflection API. implementation enlists the class methods in a different order than the SUN impementation does. It also works on my machine at home (Ubuntu AMD64 Linux with 64 bit Sun VM). I've suggested BEA a solution for this. I hope they'll accept it and will provide a patch soon.

      After these bugs have been fixed there remains one big problem in EJB3 Interceptor life cycle management. This problem has been pretty hard to find but I finally found the problem. The problem is that BEA handles the creation of these Interceptor instances differently from JBoss AS (and maybe Glassfish and others). As a workaround, I've implemented a fix which is available in JBoss JIRA


      This fix will make the seam Java EE 5 booking example work together with the changes I've posted to this JIRA topic too. I'm not sure if it's 100% clear that the WLS behaviour is a spec violation, nor how easy it will be for BEA to fix it nor how long it will take them to fix it.
      Furthermore I don't know if my workaround will work in any case. All cases I know from our ported applications are runtime compatible since applying my fix.

      The last problem currently is by far the worst, because you can't fix it by cutting out the component with varargs because it will affect all EJB3 components.

      My suggestion is to implement a workaround (maybe only for BEA WLS) which handles this problem. Maybe similar, maybe totally different from the one I posted to the JIRA, I really don't care as long as it works.
      Unfortunately I'm stuck here because no one seems to have seriously checked this issue from the Seam development team. So here once again I strongly encourage those people to invest a little time into this issue to finally make Seam BEA WebLogic compatible. A feature a lot of people out there are waiting for far more desperately than for the integration of more and more other frameworks.

      Best regards,