1 2 Previous Next 19 Replies Latest reply on Feb 13, 2008 6:15 AM by srinivas.c.v

    Seam 2.0.1GA : EJB Blockers with Weblogic 9.x/10.x

    joerg.schneider

      Hi,

      first of all congratulations for the Seam 2.0.1GA release and thanks for the updated documentation, especially how to run Seam in appservers other than JBoss.
      As I read from the docs the varargs issue with Bea Weblogic still persists. As far as I understood, BEA claims this issue to be an ambiguity within the Java specs, since the same flag is used to mark fields transient as it is used to mark methods have variable arguments. I furthermore understood, that this issue is not necessarily related to EJB's only, but actually apply to any java code. The fact that the issue shows up with EJB's only is due to jrockits re-compiles the EJB's during deployment.
      As per my understanding, a compiler/interpreter should be in a position to handle the transient/vararg flag different for fields and methods (as Sun's implementation apparently does) so I actually see it BEA's responsibility to fix that issue.

      Anyhow, according to my experience I'd not expect such a fix is being delivered by BEA within the next 12 months, if at all. Since the next 1 or 2 years certainly will be very important for the roll-out and further distribution of Seam, would it make sense to fix that (rather "work around") within Seam in the meantime ? As far as I understood, the proposed work around is to use arrays instead of varargs in methods/constructors to avoid the issue. This seem to be an acceptable work around for me to overcome the issue for any of my projects/developments. The only problem remaining is : how many Seam internal EJB's are using varargs currently and if it makes sense to use arrays instead of varargs to have some kind of Weblogic/JRockit compatibility ?
      I mean I fully understand that using varargs is the proper implementation, but I'd consider using arrays as a valid work around and if it's only the "TimerService" ejb that currently causes the problem in JRockit/Weblogic, why not take a step back (=use arrays) and therefore have another major player (Weblogic) on board. I made much bigger comprises during my IT career so far :-)

      If a fix for jrockit is provided that can naturally been reversed.

      Any thoughts ?

        • 1. Re: Seam 2.0.1GA : EJB Blockers with Weblogic 9.x/10.x
          pmuir

          This is worth considering, or alternatively providing a version of the jboss-seam.jar that is compatible with jrockit.

          • 2. Re: Seam 2.0.1GA : EJB Blockers with Weblogic 9.x/10.x
            joerg.schneider

            Hi,

            I added some more comments to the existing BEA forum, so anyone being interested can read :

            http://forums.bea.com/thread.jspa?messageID=300006290

            I very much appreciate Pete's comment and would naturally be happy either way it is done - using arrays/ArrayLists or having a separate jboss-seam.jar for weblogic is perfectly fine with me :-)

            Thanks.

            • 3. Re: Seam 2.0.1GA : EJB Blockers with Weblogic 9.x/10.x
              pmuir

              http://jira.jboss.com/jira/browse/JBSEAM-2482

              As a workaround, try reconstituting the jboss-seam.jar without the org.jboss.seam.async.TimerServiceDispatcher class

              • 4. Re: Seam 2.0.1GA : EJB Blockers with Weblogic 9.x/10.x
                joerg.schneider

                Hi,

                since my company owns a support contract with BEA, I did open an official "CASE" with BEA - let's see what happens.

                I will keep you informed.

                Thanks.

                • 5. Re: Seam 2.0.1GA : EJB Blockers with Weblogic 9.x/10.x

                  Does this have any relevance when using JBoss 4.2.2 with jrockit?

                  • 6. Re: Seam 2.0.1GA : EJB Blockers with Weblogic 9.x/10.x
                    joerg.schneider

                    Hi,

                    I don't think that there will be a problem running JBoss with jrockit, since the part that decompiles the EJB's and creates the source code seem to be weblogic/appserver specific and has nothing to do with the plain underlying JVM.
                    Apparently, JBoss is working fine in this respect - anyhow, a simple test case could be to deploy the seam samples as they are in JBoss using a jrockit JVM. Since Seam contains the TimerServiceDispatcher EJB using varargs that should trigger the problem - or not :-)

                    • 7. Re: Seam 2.0.1GA : EJB Blockers with Weblogic 9.x/10.x
                      jbalunas

                      Thank you very much for adding your voice to this. I find this unacceptable that BEA does not fix this. It has been there for over a year.

                      "joerg.schneider" wrote:
                      Hi,

                      since my company owns a support contract with BEA, I did open an official "CASE" with BEA - let's see what happens.

                      I will keep you informed.

                      Thanks.


                      I will be looking at implementing an alternative jboss-seam jar that does not have the EJB timer in it. For now this is the least intrusive approach.

                      • 8. Re: Seam 2.0.1GA : EJB Blockers with Weblogic 9.x/10.x
                        lauerc

                        Hi folks,

                        I'm currently working on the same issues because I'm forced to use BEA WebLogic Server, but like to continue to use JBoss Seam.

                        I've tried to patch the current Seam version (2.0.1.GA) to get one step beyond the known EJB3 compiler problem. This was quite easy because only one single EJB interface is affected:

                        org.jboss.seam.async.Dispatcher


                        I've replaced the varargs definitions (Object...) by Object[], which is what the compiler creates anyway from it. For reasons of convenience, I've also created an method which completely reduces the method to the non variable parts.

                        Here's an example:

                        public T scheduleTimedEvent(String type, S schedule, Object... parameters);


                        was turned into:

                        public T scheduleTimedEvent(String type, S schedule);
                        public T scheduleTimedEvent(String type, S schedule, Object[] parameters);


                        Maybe this is not as elegant as the varags solution, but it's a pragmatic way to suit our needs as I don't think BEA will fix the related problem in short.

                        The next problem I stumbled into was a classloading problem related to another problem in BEA WebLogic 10.0 MP1. The server only works properly with it's own jsf implementation which is not deployed by default. It is packed into a war archive located at

                        wlserver_10.0/common/deployable-libraries/jsf-1.2.war


                        I tried to deploy this archive which failed, so I unpacked it and placed the included jars into the 'lib' folder below my weblogic domain root.

                        After that I found out, that one jboss jar, which is needed to run the application under other application servers was missing in the seam distribution. I placed this file (concurrent.jar) into the folder lib below by test application subproject (examples/jee5/lib).

                        After some more deployment descriptor related changes, which I will not describe in detail, the application seems to work at first.
                        Unfortunately I detected runtime failures when playing around with the booking application. From time to time the application failed with an InvocationTargetException. After hours of code analyzing and debugging, I found out that the problem has to be a side effect of different EJB lifecycle implementation in WebLogic Server compared to JBoss AS (I don't know which behaviour is wrong or right, and I won't judge it here).

                        Actually the method postConstruct(...) of class

                        org.jboss.seam.intercept.SessionBeanInterceptor


                        seems to rule the initialization of this interceptor. This method seems to be called before any call of aroundInvoke at JBoss AS. On WebLogic Server this is different. As a result of this sometimes the injection field or method invoking for a specific object is executed using the reflection fields and methods of different component classes. To fix this problem, I've copied the initialization calls from method post construct into the method aroundInvoke to make sure that it is called prior to the actual invocation. After this change the booking demo seems to work perfectly.

                        I've packed all source changes and the missing jar file into one zip archive and will post it into this thread. To use this, simply extract it below the exploded distro archive and rebuild first seam and then the jee5/booking demo.

                        Best regards,
                        Christian

                        • 9. Re: Seam 2.0.1GA : EJB Blockers with Weblogic 9.x/10.x
                          lauerc

                          Unfortunately there doesn't seem to exist a possibility to upload attachments into a thread, any ideas how to make my patches available?

                          Regards,
                          Christian

                          • 10. Re: Seam 2.0.1GA : EJB Blockers with Weblogic 9.x/10.x
                            jbalunas

                            Great Job!! - it's funny, I've been working on this exact issue today. Only instead of changing the ejb timer I removed the offending EJB from the jar. Same effect because we are not using that EJB in the example.

                            Since I was working on the 10.0.3 tech preview when I got past the EJB issue I ran into the issue where EJB's only work with kodo/openJPA.

                            The last thing I was working on was the JSF issue that you describe. I'll try your solution tomorrow.

                            The best way to post files or patches is through jira - here is the link for this issue:
                            http://jira.jboss.com/jira/browse/JBSEAM-2482

                            I'm curious about the interceptor and deployment file changes that you made as well.

                            After I get the example running I'll update the reference guide with this info.

                            Thanks again,
                            Jay

                            • 11. Re: Seam 2.0.1GA : EJB Blockers with Weblogic 9.x/10.x
                              joerg.schneider

                              Excellent - brilliant - what more can I say ? Apparently someone finally spent some fforts in resolving this issue entirely and got Seam work fine in Weblogic. Now, that not only the vararg issue is resolved but also any subsequent issue and the Seam examples running fine (incl. the TimerServiceDispatcher EJB) I'd strongly suggest to include these changes into the next release.
                              Just excluding the TimerService from the seam deployment should not be an option anymore, now that there is a solution available.

                              You made my day :-)

                              • 12. Re: Seam 2.0.1GA : EJB Blockers with Weblogic 9.x/10.x
                                lauerc

                                Hi guys,

                                finally I've found a way to release the patch ;-)

                                It's attached to this JIRA issue:

                                http://jira.jboss.com/jira/browse/JBSEAM-2592

                                Kind regards,
                                Christian

                                • 13. Re: Seam 2.0.1GA : EJB Blockers with Weblogic 9.x/10.x
                                  jbalunas

                                  I wanted to let you know that I tested out your changes and they are working great.

                                  Good investigation.

                                  • 14. Re: Seam 2.0.1GA : EJB Blockers with Weblogic 9.x/10.x
                                    joerg.schneider

                                    Hi,

                                    does that mean the changes (finally :-) find their way into the next release of Seam ? That is at least what I'd expect and as far as I understood from Gavin, support for other appservers than JBoss has become a top priority for the Seam project (see respect. Seam 2.0.0 announcment thread in TheServerSide).

                                    @Christian : again, thanks for that excellent piece of work.

                                    1 2 Previous Next