Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Tomcat - JSP/Servlet container
Struts - A MVC web framework
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
JSP - A mailing list about Java Server Pages specification and reference
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Oracle Connection Pooling in 3 2 2
Servlet : Session invalidate
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Tomcat and webapplication specific java library path
Running a Simple JMS Example
Mapping in workers2 properties
org apache jasper JasperException
Cannot find message resources under key org apache struts action
   MESSAGE
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
url string for connecting jboss to oracle
Value attribute of <html:checkbox
javax servlet ServletException: BeanUtils populate
HTTP Status 404 The requested resource is not available
5 0 18: Windows XP Pro vs Windows 2000
 
- SMPC Configuration

- SMPC Configuration

2007-07-11       - By monkeyden

 Back
I'm running JMeter against a screen in my application and it's failing
miserably, so I created a rudimentary test case and it's failing also.  I'm
guessing that I have something misconfigured.  Here is what I have:

<persistence xmlns="http://java.sun.com/xml/ns/persistence"
 |              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 |              xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
 |              version="1.0">
 |              
 |    <persistence-unit name="dcdb">
 |       <provider>org.hibernate.ejb.HibernatePersistence</provider>
 |       <jta-data-source>java:/ds_dcdb</jta-data-source>
 |       <properties>
 |          <property name="hibernate.hbm2ddl.auto" value="none"/>
 |          <property name="hibernate.cache.use_query_cache" value="true"/>
 |          <property name="hibernate.show_sql" value="true"/>
 |          <property name="hibernate.dialect" value="org.hibernate.dialect
.OracleDialect" />
 |          <property name="jboss.entity.manager.factory.jndi.name" value=
"java:/dcdb"/>
 |          <property name="hibernate.default_schema" value="dcdb"/>
 |       </properties>
 |    </persistence-unit>
 |    <persistence-unit name="images">
 |       <provider>org.hibernate.ejb.HibernatePersistence</provider>
 |       <jta-data-source>java:/ds_images</jta-data-source>
 |       <properties>
 |          <property name="hibernate.hbm2ddl.auto" value="none"/>
 |          <property name="hibernate.cache.use_query_cache" value="true"/>
 |          <property name="hibernate.show_sql" value="true"/>
 |          <property name="hibernate.dialect" value="org.hibernate.dialect
.OracleDialect" />
 |          <property name="jboss.entity.manager.factory.jndi.name" value=
"java:/images"/>
 |          <property name="hibernate.default_schema" value="img"/>
 |       </properties>
 |    </persistence-unit>
 | </persistence>

components.xml
<core:managed-persistence-context name="dcdbEM" persistence-unit-jndi-name=
"java:/dcdb" auto-create="true"/>

pages.xml
<page view-id="/test/testEmployee.xhtml" action="#{testEmployeeAction
.loadEmployee}"/>

Action
@(protected)("testEmployeeAction")
 | @(protected)(ScopeType.SESSION)
 | public class TestEmployeeAction {
 |
 |     @(protected)
 |     private static Log log;
 |    
 |     Employee employee;
 |    
 |     @(protected)
 |     public void create(){
 |        
 |     }
 |    
 |     public void loadEmployee(){
 |         EmployeeBO employeeBO = (EmployeeBO)Component.getInstance(
"employeeBO");
 |         this.employee = (Employee)employeeBO.findByPrimaryKey(new Long
(206485));
 |         log.debug("Employee found: #0", employee.getFullName());
 |     }
 |
 |     /**
 |      * @(protected) the employee
 |      */
 |     public Employee getEmployee() {
 |         return employee;
 |     }
 |
 |     /**
 |      * @(protected) employee the employee to set
 |      */
 |     public void setEmployee(Employee employee) {
 |         this.employee = employee;
 |     }
 | }
 |

The entity
@(protected)
 | @(protected)("employee")
 | @(protected)(name = "DWL_EMPLOYEES")
 | public class Employee extends EmployeeBase implements java.io.Serializable Source code of java.io.Serializable {
 |
 |     @(protected)
 |     @(protected)(name = "EMPLOYEE_ID", length = 22, nullable = false)
 |     public Long getEmployeeId() {
 |         return this.employeeId;
 |     }
 |
 |     public void setEmployeeId(Long employeeId) {
 |         this.employeeId = employeeId;
 |     }
 |
 |     @(protected)(name = "FIRST_NAME", length = 30, nullable = true)
 |     public String getFirstName() {
 |         return this.firstName;
 |     }
 |
 |     public void setFirstName(String firstName) {
 |         this.firstName = firstName;
 |     }
 |     ...
 |

And in the view I use facelets
<ui:define name="body">
 |         <h:form id="testEmployeeForm">
 |             #{testEmployeeAction.employee.firstName}
 |         </h:form>
 |     </ui:define>

The page works fine with a single request from the browser but under load,  the
whole document is sent in the response but my assertion fails (i.e. the
employee name is not displayed).  In fact, when using just 10 threads, 7 of
them fail.

Thanks for any advice.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic
&p=4063178#4063178

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode
=reply&p=4063178
__ ____ ____ ____ ____ ____ ____ ____ ____ ____
jboss-user mailing list
jboss-user@(protected)
https://lists.jboss.org/mailman/listinfo/jboss-user

©2008 junlu.com - Jax Systems, LLC, U.S.A.