8 Replies Latest reply on Sep 29, 2010 12:48 PM by peterj

    Looking for Examples

    violentstormm

      Hi,

      Im really new to the jboss AS and want to test the performance on different hardware.

       

      Therefor Im looking for some good applications or examples, which takes the AS to the limit.

       

      I've found some good examples bundled with the SEAM framework but they are not complex enogh.

       

      So please tell me some good examples or applications :-)

        • 1. Re: Looking for Examples
          wdfink

          Hi Marco,

          an example to put the JBoss under heavy load is very simple and very complex ;-)

          So IMHO 'the general example' you want does not exists.

           

          It depends to the application and the requirements do you have.

          We have simple SLSB (stateless session beans) and the server run performant and stable with about 500req/sec and some complex where the garbage collector will reach the limit below 50req/sec.

          So you can't give an answer to this question without knowing the requirement.

           

          If you will implement have a performant application you should pay attention to the scalability, JEE support this but not without any costs.

          • 2. Re: Looking for Examples
            peterj

            Hmm, I found that the SeamBay application was fairly decent for putting the system under stress. Of course, I modified it to use mySQL, fixed a bug in the schema, changed the auction time to a much higher value, and loaded the database with 5000 users and 15,000 auction items. I used a JMeter script to drive it.

            • 3. Re: Looking for Examples
              violentstormm

              @Peter:

              sound's interesting, I will try to do something similar.

              Could you tell me some more details?

               

              @ Wolf-Dieter:

              The Problem is, that I'm the admin not the developer :-)

              so I could not say what kind of application will run on the AS in the end..

              • 4. Re: Looking for Examples
                peterj

                Moving to MySQL was fairly easy, don't recall exactly what changes I made for that (probably only changing the JPA config file). In the schema, at one location there was an embedded object instead of a reference to that object, I don't recall where that was, but it was really easy to spot (I think I saw it once the schema was loaded into MySQL and I used the MySQL tools to browse the schema) and easy to fix (added an annotation, if I recall correctly).

                 

                I used a JMeter script to populate the users. And another script to populate the auction items (with a really long auction time - SeamBay does really weird things if you bring up the server and the auctions have expired - it pretty much screws up the database and you have to start over again with a clean database and repopulate it).

                 

                Then I wrote a JMeter script to put the whole system under load. I documented that script on a white paper that I presented at the CMG 2008 Conference. I would provide a URL to the white paper, but only the white papers thru 2007 are available to the public - you have to be a CMG member to get at the 2008 white papers. The 2008 papers should be made public sometime next year.

                • 5. Re: Looking for Examples
                  violentstormm

                  Here we go:

                  Finally I've managed it to get a working Jboss 5.1 GA with jdk1.6 and Mysql connection.

                  Also the Seam-bay application was deployed successfully with Mysql connection. Therefore I edited the jboss-seam-bay-ds.xml as followed:

                   

                  <?xml version="1.0" encoding="UTF-8"?>
                  
                  <!DOCTYPE datasources
                   PUBLIC "-//JBoss//DTD JBOSS JCA Config 1.5//EN"
                   "http://www.jboss.org/j2ee/dtd/jboss-ds_1_5.dtd">
                  
                  <datasources>
                   <local-tx-datasource>
                   <jndi-name>seambayDatasource</jndi-name>
                   <connection-url>jdbc:mysql://localhost:3306/jboss</connection-url>
                   <driver-class>com.mysql.jdbc.Driver</driver-class>
                   <user-name>jboss</user-name>
                   <password>jboss</password>
                   <valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLValidConnectionChecker</valid-connection-checker-class-name>
                  <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
                  <metadata>
                   <type-mapping>mySQL</type-mapping>
                   </metadata>
                   </local-tx-datasource>
                  </datasources>
                  

                   

                   

                  when I start the server with the all config there are some warnings and 1 Error:

                   

                  Error:

                  12:31:02,033 ERROR [SchemaExport] schema export unsuccessful
                  org.hibernate.JDBCException: Error during import script execution at line 1
                  

                   

                  Warnings:

                   

                  2010-09-28 12:30:50,794 WARN  [org.jboss.jms.server.jbosssx.JBossASSecurityMetadataStore] (main) WARNING! POTENTIAL SECURITY RISK. It has been detected that the MessageSucker component which sucks messages from one node to another has not had its password changed from the installation default. Please see the JBoss Messaging user guide for instructions on how to do this.
                  2010-09-28 12:30:50,814 WARN  [org.jboss.annotation.factory.AnnotationCreator] (main) No ClassLoader provided, using TCCL: org.jboss.managed.api.annotation.ManagementComponent
                  2010-09-28 12:30:51,031 WARN  [org.jboss.annotation.factory.AnnotationCreator] (main) No ClassLoader provided, using TCCL: org.jboss.managed.api.annotation.ManagementComponent
                  2010-09-28 12:30:58,616 WARN  [org.jboss.ejb3.interceptors.aop.InjectInterceptorsFactory] (main) WEIRDNESS IN AOP: advisor org.jboss.ejb3.aop.ExtendedManagedObjectAdvisor@4c091108
                  2010-09-28 12:30:58,624 WARN  [org.jboss.ejb3.interceptors.aop.InjectInterceptorsFactory] (main) WEIRDNESS IN AOP: advisor org.jboss.ejb3.aop.ExtendedManagedObjectAdvisor@4c091108
                  2010-09-28 12:30:58,631 WARN  [org.jboss.ejb3.interceptors.aop.InjectInterceptorsFactory] (main) WEIRDNESS IN AOP: advisor org.jboss.ejb3.aop.ExtendedManagedObjectAdvisor@4c091108
                  2010-09-28 12:30:58,633 WARN  [org.jboss.ejb3.interceptors.aop.InjectInterceptorsFactory] (main) WEIRDNESS IN AOP: advisor org.jboss.ejb3.aop.ExtendedManagedObjectAdvisor@4c091108
                  2010-09-28 12:30:59,234 WARN  [org.hibernate.ejb.Ejb3Configuration] (main) Persistence provider caller does not implement the EJB3 spec correctly. PersistenceUnitInfo.getNewTempClassLoader() is null.
                  2010-09-28 12:31:01,571 WARN  [org.hibernate.impl.SessionFactoryObjectFactory] (main) InitialContext did not implement EventContext
                  2010-09-28 12:31:02,692 WARN  [org.jboss.xb.binding.parser.sax.SaxJBossXBParser] (main) schema_reference.4: Failed to read schema document 'jaxws-config_2.0.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>. @ *unknown*[4,76]
                  2010-09-28 12:31:03,182 WARN  [org.jboss.xb.binding.parser.sax.SaxJBossXBParser] (main) schema_reference.4: Failed to read schema document 'jaxws-config_2.0.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>. @ *unknown*[4,76]
                  2010-09-28 12:31:03,460 WARNING [javax.enterprise.resource.webcontainer.jsf.config] (main) Unable to process deployment descriptor for context '/jboss-seam-bay-jboss-seam-bay'
                  2010-09-28 12:31:03,735 WARN  [org.jboss.seam.jsf.SeamPhaseListener] (main) There should only be one Seam phase listener per application
                  2010-09-28 12:31:05,800 WARN  [org.jboss.seam.Component] (main) Component class should be serializable: bidAction
                  2010-09-28 12:31:06,111 WARN  [org.jboss.seam.async.QuartzDispatcher] (main) No seam.quartz.properties file. Using in-memory job store.
                  2010-09-28 12:31:06,115 WARN  [org.jboss.seam.security.permission.PersistentPermissionResolver] (main) no permission store available - please install a PermissionStore with the name 'org.jboss.seam.security.jpaPermissionStore' if persistent permissions are required.
                  
                  
                  

                   

                  How should I handle these messages?

                   

                   

                  Edit:

                  Could handle the Error by myself. It was caused by some Case-sensetive Erros in the import.sql file..

                   

                   

                  Now Everything runs smooth until I want to place a bid..

                  therefore I get some strange exeptions:

                   

                   

                   

                  Exception during request processing:
                  Caused by javax.servlet.ServletException with message: "#{bidAction.confirmBid}: javax.persistence.PersistenceException: org.hibernate.exception.DataException: could not insert: [org.jboss.seam.example.seambay.Bid]"
                  

                   

                   

                   

                  Caused by javax.faces.FacesException with message: "#{bidAction.confirmBid}: javax.persistence.PersistenceException: org.hibernate.exception.DataException: could not insert: [org.jboss.seam.example.seambay.Bid]"
                  

                   

                  Caused by javax.faces.el.EvaluationException with message: "javax.persistence.PersistenceException: org.hibernate.exception.DataException: could not insert: [org.jboss.seam.example.seambay.Bid]"
                  

                   

                   

                  what should I do?

                   

                  Nachricht geändert durch Marco Barber

                  • 6. Re: Looking for Examples
                    fstani

                    I'm not familiar with SeamBay, but I would guess that you might have not setup the id generation in MySQL, does the Bid table have an auto-increment setting on the id (primary key) field?

                     

                    That might be the problem.

                    • 7. Re: Looking for Examples
                      violentstormm

                      I have to change the datatype in row 'account' from tinyblob to longblob...

                       

                      now I want to know how to make my auctions, users and so on  permanent?

                      After a restart of the JBoss everything is set to zero :-(

                      • 8. Re: Looking for Examples
                        peterj

                        By default every time you start SeamBay the database gets wiped out and reset. You need to change the hibernate.hbm2ddl.auto setting in META-INF/persistence.xml to update. (I have found that I need to set it to 'create' for the first run and then set it to 'update' for subsequent runs.)