11 Replies Latest reply on Apr 6, 2006 7:43 AM by Gavin King

    Upgrade to jboss-4.0.4.GA-ejb3

    Louis Coetzee Apprentice

      Hi,

      this might be jumping the gun a bit (but then again I like the bleeding edge ;-). Some of it might not be related to Seam itself, but as I am trying to get my Seam app working again this might be the most appropriate forum.

      I did a cvs update of the JBoss tree that I have been using to build my own latest and greatest jboss (jboss-4.0.x).

      The latest build revealed two different versions:
      1.
      jboss-4.0.4.GA and jboss-4.0.4.GA-ejb3. Does anybody know what the difference between these two builds are ? (I have browsed the various forums, but haven't been able to find usefull info)

      2. What does the GA mean ? Is this in line with the Hibernate 3.2.0.CR1 release ?

      3. I have recompiled my seam dist as well as my own application to use the
      jboss-4.0.4.GA-ejb3 build. I have tried deploying my app, but get stack traces... something about:


      2006-04-05 17:18:02,977 ERROR [STDERR] Caused by: java.lang.NoSuchMethodError: javax.persistence.EntityManagerFactory.createEntityManager(Ljavax/persistence/PersistenceContextType;)Ljavax/persistence/EntityManager;
      2006-04-05 17:18:02,978 ERROR [STDERR] at org.jboss.seam.core.ManagedPersistenceContext.create(ManagedPersistenceContext.java:51)
      


      4. Is there something specific I have to change in my configuration to use the new JBoss ? (the booking example works as normal).

      Regards

      L


        • 1. Re: Upgrade to jboss-4.0.4.GA-ejb3
          Gavin King Master

          I had better try this stuff, and upgrade Seam to the latest release of EJB3.

          I'll try to work on it today.

          • 2. Re: Upgrade to jboss-4.0.4.GA-ejb3
            Louis Coetzee Apprentice

            Cool... fortunately it is now evening here. Time for a beer me thinks ;-)

            I have stepped into it a bit.. seems that there is a problem getting the seam managed persistence context. I get an exception on line 51 in org.jboss.seam.core.ManagedPersistenceContext for my java:/EntityManagerFactories/napEntityManagerF as defined in my web.xml

            L

            • 3. Re: Upgrade to jboss-4.0.4.GA-ejb3
              Mirko Adari Novice

              lcoetzee how do you acoomplish following:

              Every time a user hits my seam application he`s or her`s locale is set to ee? Seam offers component level default locale, but how to go in session level locale?

              • 4. Re: Upgrade to jboss-4.0.4.GA-ejb3
                Thorsten Kunz Novice

                 

                "lcoetzee" wrote:
                2. What does the GA mean ? Is this in line with the Hibernate 3.2.0.CR1 release ?

                Usualy (I am not sure about JBoss tho) GA means "General Availability" and is used to flag a "final" and production ready release after a bunch of "Release Candidates" (or in the new JBoss terms "Candidates for Release").

                • 5. Re: Upgrade to jboss-4.0.4.GA-ejb3
                  Gavin King Master

                  OK, so the situation is that JBoss AS has gone out with a CVS build of EJB3 that integrates the latest release of HEM (which reflects changes to the EJB spec). But, since Bill is on vacation this week, there is no EJB3 release.

                  Since I have to target the standalone EJB3 package, I can't upgrade to the JBoss 4.0.4CR release, so people are going to have to tough it out on 4.0.4RC1 for a while longer, until Bill gets back and does a release of EJB3.

                  • 6. Re: Upgrade to jboss-4.0.4.GA-ejb3
                    Scott Stark Master

                     

                    "SunFire" wrote:
                    "lcoetzee" wrote:
                    2. What does the GA mean ? Is this in line with the Hibernate 3.2.0.CR1 release ?

                    Usualy (I am not sure about JBoss tho) GA means "General Availability" and is used to flag a "final" and production ready release after a bunch of "Release Candidates" (or in the new JBoss terms "Candidates for Release").


                    There should be no doubts:
                    http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossProductVersioning


                    • 7. Re: Upgrade to jboss-4.0.4.GA-ejb3
                      Scott Stark Master

                       

                      "lcoetzee" wrote:
                      Hi,

                      this might be jumping the gun a bit (but then again I like the bleeding edge ;-). Some of it might not be related to Seam itself, but as I am trying to get my Seam app working again this might be the most appropriate forum.

                      I did a cvs update of the JBoss tree that I have been using to build my own latest and greatest jboss (jboss-4.0.x).

                      The latest build revealed two different versions:
                      1.
                      jboss-4.0.4.GA and jboss-4.0.4.GA-ejb3. Does anybody know what the difference between these two builds are ? (I have browsed the various forums, but haven't been able to find usefull info)



                      See:
                      http://www.jboss.com/index.html?module=bb&op=viewtopic&t=80196


                      • 8. Re: Upgrade to jboss-4.0.4.GA-ejb3
                        Louis Coetzee Apprentice

                         

                        how do you acoomplish following:

                        Every time a user hits my seam application he`s or her`s locale is set to ee? Seam offers component level default locale, but how to go in session level locale?


                        I haven't looked at the latest Seam support for the various locales. Most likely I will have to refactor my code to use the Seam approach. In my implementation I had to extend the JSF ViewHandler and over ride the caclulateLocale method. Based on a property in session context indicating the user's chosen locale one can then return the desired locale. Something like the following (this is just code from memory... not tested) (UserEnvironment might contain useful information such as the users roles, locale, preferred view options etc. populated after login ):

                        public class I18nViewHandler extends ViewHandler {
                        ....
                         @Override
                         public Locale calculateLocale(FacesContext arg0) {
                         Locale locale = null;
                         userEnvironment = (UserEnvironment)Component.getInstance("userEnvironment",true);
                         //use the userEnvironment value
                         locale = userEnvironment.getLocale();
                         if (locale != null) {
                         return locale;
                         } else {
                         return baseViewHandler.calculateLocale(arg0);
                         }
                         }
                        ......
                        

                        Obviously you have to register this new viewhandler in you faces-confic.xml:
                         <application>
                         <message-bundle>nap</message-bundle>
                         <locale-config>
                         <default-locale>en</default-locale>
                         <supported-locale>af</supported-locale>
                         <supported-locale>zu</supported-locale>
                         </locale-config>
                         <view-handler>csir.utils.viewhandler.I18nViewHandler</view-handler>
                         </application>
                        


                        Regards

                        Louis


                        • 9. Re: Upgrade to jboss-4.0.4.GA-ejb3
                          Mirko Adari Novice

                          Thank you louis. Maybe we could share our IM passports? Would be good to talk about something real fast sometimes.

                          • 10. Re: Upgrade to jboss-4.0.4.GA-ejb3
                            Louis Coetzee Apprentice

                             

                            share our IM passports

                            Unfortunately this would be difficult. I sit behind several firewalls blocking all of the instant messaging protocols (including irc). This forum works well for me though.


                            • 11. Re: Upgrade to jboss-4.0.4.GA-ejb3
                              Gavin King Master

                               

                              "lcoetzee" wrote:
                              I haven't looked at the latest Seam support for the various locales. Most likely I will have to refactor my code to use the Seam approach. In my implementation I had to extend the JSF ViewHandler and over ride the caclulateLocale method. Based on a property in session context indicating the user's chosen locale one can then return the desired locale.


                              Yes, this is pretty much how the Seam localization stuff works. Except Seam also exposes a built-in component that you can expose directly to your JSF page to do locale switching from the UI.