5 Replies Latest reply on May 3, 2010 10:19 PM by Calebe Varga

    Disabling Seam Debug Page

    Darren Kane Newbie

      Hi,


      I have a problem with users seeing the Seam debug page.  We have an issue if someone is to 'machine-gun' click a link.


      javax.el.ELException: /myDir/myPage.xhtml...
      javax.ejb.EJBTransactionRolledbackException: [EJB:015019]If a session bean instance is participating in a transaction, it is an error for a client to invoke a method on the session object such that the transaction attribute specified in the bean's metadata annotations and/or the deployment descriptor would cause the container to execute the method in a different transaction context or in an unspecified transaction context. You may also consider setting the <allow-concurrent-calls> option in your weblogic-ejb-jar.xml. When this tag is set, the concurrent call waits for the first method call to complete.; nested exception is: weblogic.ejb20.locks.LockTimedOutException: [EJB:010107]The lock request from EJB:mySearchAction with primary key:210425291238014976 timed-out after waiting 0 ms. The transaction or thread requesting the lock was:Xid=BEA1-0446E205D3D4FC8EB4B4...
      



      I have tried including allow-concurrent-calls in weblogic-ejb-jar.xml...


          <weblogic-enterprise-bean>
              <ejb-name>myEJB</ejb-name>
              <stateful-session-descriptor>
                  <allow-concurrent-calls>true</allow-concurrent-calls>
              </stateful-session-descriptor>
              <local-jndi-name>myWeb/mySearchAction/local</local-jndi-name>
          </weblogic-enterprise-bean>
      




      And I've tried an exception re-direct in the pages.xml


          <exception class="javax.el.ELException">
              <redirect view-id="/error.xhtml">
                  <message>Please try again ...</message>
              </redirect>
          </exception>
      



      I have also tried disabling debug in components.xml and removing seam-debug.jar


          <core:init jndi-pattern="myPattern" 
                     debug="false"/>  
      



      Strangely the seam debug page appears until I set Production mode to true in web.xml


          <context-param>
              <param-name>facelets.DEVELOPMENT</param-name>
              <param-value>false</param-value>
          </context-param>
      



      I need a neat way of handling this if possible.  I've read about a4j request queues but don't really want to go down that path as I would prefer to avoid more compatibility issues.


      I guess I could also disable all links following a click but again this is pretty ugly.


      Any ideas?  All help greatly appreciated.


      Anyone got any ideas? 

        • 1. Re: Disabling Seam Debug Page
          Sean Tozer Newbie

          Is there a problem with setting development to false? That would seem to be the logical route to take if you don't want to display debug information to end-users.


          The seam-gen build.xml structure includes a build-dev and build-prod to provide this type of functionality on different deploys.

          • 2. Re: Disabling Seam Debug Page
            Darren Kane Newbie

            I don't want a Internal Server Error page either, which I believe is what will happen if I just set development to false.


            I want a neat way for the system to realise an error has happened and redirect to our standard error page / home page with faces message.

            • 3. Re: Disabling Seam Debug Page
              Sean Tozer Newbie

              Have you tried catching that error in pages.xml? Something like:



                  <exception class="javax.persistence.EntityNotFoundException">
                      <redirect view-id="/error.xhtml">
                          <message severity="warn">Record not found</message>
                      </redirect>
                  </exception>



              • 4. Re: Disabling Seam Debug Page
                Darren Kane Newbie

                Hi Sean


                Yeah I tried this...


                <exception class="javax.el.ELException">
                        <redirect view-id="/error.xhtml">
                            <message>Please try again ...</message>
                        </redirect>
                </exception>
                



                and this...


                <exception>
                        <redirect view-id="/error.xhtml">
                            <message>Please try again ...</message>
                        </redirect>
                </exception>
                



                I've added some Javascript in for now to disable links/buttons as soon as someone clicks on one.  Obviously this is not ideal, but at least for meantime will stop users seeing the seam debug page.


                Any more ideas you may have still appreciated though - cheers!

                • 5. Re: Disabling Seam Debug Page
                  Calebe Varga Newbie

                  Remove from the WEB-INF/lib


                  jboss-seam-debug.jar
                  



                  Removing this will disable debuging.


                  In my case it works.


                  Cheers !