Menu

OpenXava + Jetty

2006-08-01
2012-11-26
  • Olaniyi Osunsanya

    Hi Javier,
    Can OpenXava be deployed on Jetty and can this
    deployment be used for production purposes?
    I wouldn't know why the deployment on JBoss is a bit problematic. Is it because openxava uses ejb services extensively? Or is it the tomcat that JBoss delegates to that is the problem?
    I noticed that in no time, when just a few people start accessing the application, jboss starts to give funny errors and it becomes very slow.
    Can you please advice on this.

    Thanks
    JNiyi

     
    • Javier Paniza

      Javier Paniza - 2006-08-02

      Hi JNiyi,

      > Can OpenXava be deployed on Jetty ... ?

      Yes, but you need to use Hibernate for persistence (since v2.0) and you cannot use any EJB code in your application.

      > and can this 
      deployment be used for production purposes?
      I don't test jetty, but tomcat, websphere and jboss.

      > Is it because openxava uses ejb services extensively?
      No. The use of EJB from OpenXava is optimal. But EJB is a tricky technology, so if you use EJB for programming some process maybe this process is slow, but you system will be slow only when you call to this process.

      > Or is it the tomcat that JBoss delegates to that is the problem?
      No. The tomcat embedded in jboss is so good.

      Your problem is an issue of jboss tunnig. Although this is not a problem of OpenXava, I can give you some tips to tune your jboss.

      I need more info:
      What O.S are you using? Linux, Windows.. 32 or 64 bits
      What JDK are you using? Sun, BEA, 32 or 64 bits
      What amount of RAM has your server?
      Is it your server a dedicated one?
      What parameters put in your JVM for maximum memory (that is -Xmx )?
      Are you executing massive process? How many records?
      What error is produces in jboss?

      Hibernate + Tomcat is better that EJB + JBoss, but EJB + JBoss must produce good performance too, it's only a tunning question

      Cheers
      Javier

       
    • Olaniyi Osunsanya

      OS: Linux
      JDK: Sun j2se 5.0
      RAM: 1GB
      Dedicated server?: YES
      Parameters: -Xms128 -Xmx512
      Massive process?: not quite, implementing a full scale application
      JBOSS Errors:
      2006-07-25 14:24:31,307 DEBUG [org.hibernate.transaction.JDBCTransaction] begin
      2006-07-25 14:24:31,307 DEBUG [org.hibernate.jdbc.ConnectionManager] opening JDBC connection
      2006-07-25 14:25:01,309 DEBUG [org.hibernate.util.JDBCExceptionReporter] Cannot open connection [???]
      org.jboss.util.NestedSQLException: No ManagedConnections available within configured blocking timeout ( 30000 [ms] ); - nested throwable: (javax.resource.ResourceException: No ManagedConnections available within configured blocking timeout ( 30000 [ms] ))
          at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:94)
          at org.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:69)
          at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:324)
          at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:118)
          at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:127)
          at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:57)
          at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1307)
          at org.openxava.tab.Tab.loadUserPreferences(Tab.java:841)
          at org.openxava.tab.Tab.setModelName(Tab.java:654)
          at org.apache.jsp.WEB_002dINF.jsp.xava.module_jsp._jspService(org.apache.jsp.WEB_002dINF.jsp.xava.module_jsp:302)
          at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
          at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
          at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
          at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
          at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
          at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
          at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
          at org.apache.jetspeed.dispatcher.JetspeedRequestDispatcher.include(JetspeedRequestDispatcher.java:72)
          at org.openxava.web.portlets.XavaPortlet.doView(XavaPortlet.java:85)
          at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:247)
          at javax.portlet.GenericPortlet.render(GenericPortlet.java:175)
          at org.apache.jetspeed.factory.JetspeedPortletInstance.render(JetspeedPortletInstance.java:102)
          at org.apache.jetspeed.container.JetspeedContainerServlet.doGet(JetspeedContainerServlet.java:230)
          at org.apache.jetspeed.container.JetspeedContainerServlet.doPost(JetspeedContainerServlet.java:344)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
          at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
          at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
          at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
          at org.apache.jetspeed.container.invoker.ServletPortletInvoker.invoke(ServletPortletInvoker.java:213)
          at org.apache.jetspeed.container.invoker.ServletPortletInvoker.render(ServletPortletInvoker.java:125)
          at org.apache.pluto.PortletContainerImpl.renderPortlet(PortletContainerImpl.java:119)
          at org.apache.jetspeed.container.JetspeedPortletContainerWrapper.renderPortlet(JetspeedPortletContainerWrapper.java:120)
          at org.apache.jetspeed.aggregator.impl.RenderingJobImpl.execute(RenderingJobImpl.java:120)
          at org.apache.jetspeed.aggregator.impl.PortletRendererImpl.renderNow(PortletRendererImpl.java:110)
          at org.apache.jetspeed.aggregator.impl.PageAggregatorImpl.aggregateAndRender(PageAggregatorImpl.java:199)
          at org.apache.jetspeed.aggregator.impl.PageAggregatorImpl.aggregateAndRender(PageAggregatorImpl.java:182)
          at org.apache.jetspeed.aggregator.impl.PageAggregatorImpl.build(PageAggregatorImpl.java:106)
          at org.apache.jetspeed.aggregator.AggregatorValve.invoke(AggregatorValve.java:48)
          at org.apache.jetspeed.pipeline.JetspeedPipeline.invokeNext(JetspeedPipeline.java:203)
          at org.apache.jetspeed.pipeline.valve.impl.ActionValveImpl.invoke(ActionValveImpl.java:132)
          at org.apache.jetspeed.pipeline.JetspeedPipeline.invokeNext(JetspeedPipeline.java:203)
          at org.apache.jetspeed.container.ContainerValve.invoke(ContainerValve.java:76)
          at org.apache.jetspeed.pipeline.JetspeedPipeline.invokeNext(JetspeedPipeline.java:203)
          at org.apache.jetspeed.decoration.DecorationValve.invoke(DecorationValve.java:100)
          at org.apache.jetspeed.pipeline.JetspeedPipeline.invokeNext(JetspeedPipeline.java:203)
          at org.apache.jetspeed.profiler.impl.ProfilerValveImpl.invoke(ProfilerValveImpl.java:179)
          at org.apache.jetspeed.pipeline.JetspeedPipeline.invokeNext(JetspeedPipeline.java:203)
          at org.apache.jetspeed.security.impl.LoginValidationValveImpl.invoke(LoginValidationValveImpl.java:143)

       
      • Javier Paniza

        Javier Paniza - 2006-08-02

        Hi Olaniyi,

        I found your problem.

        The database that openxava uses to store list preferences is broken. In this case the performance of the application is really poor, because it try to store/load the preferences until timeout error.

        The solution is easy.
        Revise the openxava-ds.xml in the deploy dir of your jboss.
        With the jboss stopped, drop the file openxava-db.script in data/hypersonic, and copy to it the OpenXava/data/openxava-ds.script. Remember that the version OpenXava (one from your obtain .script and other that your application uses) must match.

        Your application must work without the error that your inform me; then must run fast. If not, please tell me.

        Another advice. If you uses windows, use JDK of BEA, is much faster that sun. If you use JDK remove -Xmx parameter.

        Cheers
        Javier

         
    • Olaniyi Osunsanya

      Thank you, I'll try either of these options.
      Thanks again

       
  • david buedo

    david buedo - 2010-02-18

    Hi,

    I found this thread about OpenXava on Jetty, but it's a bit old, and many things have changed since then.

    What about current version OX 4m2? How difficult is to deploy an OX App on Jetty?
    Only changes in configuration are required? Any additional lib?

    I know Jetty doesn't support EJB, but how difficult is to get an OX App running on Tomcat go to work in Jetty?

    Has anyone tryed this?

    Thanks in advance.

    Best Regards,

    David Buedo

     
  • Javier Paniza

    Javier Paniza - 2010-02-18

    Hi David,

    Has anyone tryed this?

    I didn't try, though I think it must work fine in Jetty.


    Learn OpenXava by examplesGet the book

     

Log in to post a comment.