[Beginners Corner] - The performance of JBoss clustering puzzled me
by ddpie
Hi guys:
I?m new to JBoss clustering and apache.
Has anyone met problem like this? I use JBoss cluster to test my JSPs,but its performance was not so great,and even badly than the performace without clustering. Here is my environment:
I have three servers:
The first one (ip:192.168.13.26):
Windows XP sp2
512M memory
JBoss 4.04GA
The second one (ip:192.168.13.2):
Windows XP sp2
256M memory
JBoss 4.04GA
The last one (ip:192.168.13.2):
Windows 2003 Server Enterprise Edition
1G memory
Apache 2.0.59
The compiled in modules of the Apache is:
core.c
mod_win32.c
mpm_winnt.c
http_core.c
mod_so.c
httpd.config of apache on 192.168.13.2:
ServerRoot "C:\Program Files\CSS\Apache2"
| PidFile logs/httpd.pid
| Timeout 300
| KeepAlive On
| MaxKeepAliveRequests 0
| KeepAliveTimeout 15
| <IfModule mpm_winnt.c>
| ThreadsPerChild 250
| MaxRequestsPerChild 0
| </IfModule>
| Listen 8888
| LoadModule access_module modules/mod_access.so
| LoadModule actions_module modules/mod_actions.so
| LoadModule alias_module modules/mod_alias.so
| LoadModule asis_module modules/mod_asis.so
| LoadModule auth_module modules/mod_auth.so
| LoadModule autoindex_module modules/mod_autoindex.so
| LoadModule cgi_module modules/mod_cgi.so
| LoadModule dir_module modules/mod_dir.so
| LoadModule env_module modules/mod_env.so
| LoadModule imap_module modules/mod_imap.so
| LoadModule include_module modules/mod_include.so
| LoadModule isapi_module modules/mod_isapi.so
| LoadModule log_config_module modules/mod_log_config.so
| LoadModule mime_module modules/mod_mime.so
| LoadModule negotiation_module modules/mod_negotiation.so
| LoadModule setenvif_module modules/mod_setenvif.so
| LoadModule userdir_module modules/mod_userdir.so
| LoadModule ssl_module modules/mod_ssl.so
| ServerAdmin ddpie.flea(a)gmail.com
| ServerName 192.168.13.26:80
| UseCanonicalName Off
| <Directory />
| Options FollowSymLinks
| AllowOverride None
| </Directory>
| DirectoryIndex index.html index.html.var index.jsp
| <FilesMatch "^\.ht">
| Order allow,deny
| Deny from all
| </FilesMatch>
| DefaultType text/plain
| HostnameLookups Off
| LogLevel debug
| LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
| LogFormat "%h %l %u %t \"%r\" %>s %b" common
| LogFormat "%{Referer}i -> %U" referer
| LogFormat "%{User-agent}i" agent
| CustomLog logs/access.log common
| CustomLog logs/referer.log referer
| CustomLog logs/agent.log agent
| CustomLog logs/access.log combined
| ServerTokens Full
| ServerSignature On
| AliasMatch ^/manual(?:/(?:de|en|es|fr|ja|ko|ru))?(/.*)?$ "F:/Apache2/manual$1"
| IndexOptions FancyIndexing VersionSort
| IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t
| AddLanguage ca .ca
| AddLanguage cs .cz .cs
| AddLanguage da .dk
| AddLanguage de .de
| AddLanguage el .el
| AddLanguage en .en
| AddLanguage eo .eo
| AddLanguage es .es
| AddLanguage et .et
| AddLanguage fr .fr
| AddLanguage he .he
| AddLanguage hr .hr
| AddLanguage it .it
| AddLanguage ja .ja
| AddLanguage ko .ko
| AddLanguage ltz .ltz
| AddLanguage nl .nl
| AddLanguage nn .nn
| AddLanguage no .no
| AddLanguage pl .po
| AddLanguage pt .pt
| AddLanguage pt-BR .pt-br
| AddLanguage ru .ru
| AddLanguage sv .sv
| AddLanguage zh-CN .zh-cn
| AddLanguage zh-TW .zh-tw
| LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv zh-CN zh-TW
| ForceLanguagePriority Prefer Fallback
| AddCharset ISO-8859-1 .iso8859-1 .latin1
| AddCharset ISO-8859-2 .iso8859-2 .latin2 .cen
| AddCharset ISO-8859-3 .iso8859-3 .latin3
| AddCharset ISO-8859-4 .iso8859-4 .latin4
| AddCharset ISO-8859-5 .iso8859-5 .latin5 .cyr .iso-ru
| AddCharset ISO-8859-6 .iso8859-6 .latin6 .arb
| AddCharset ISO-8859-7 .iso8859-7 .latin7 .grk
| AddCharset ISO-8859-8 .iso8859-8 .latin8 .heb
| AddCharset ISO-8859-9 .iso8859-9 .latin9 .trk
| AddCharset ISO-2022-JP .iso2022-jp .jis
| AddCharset ISO-2022-KR .iso2022-kr .kis
| AddCharset ISO-2022-CN .iso2022-cn .cis
| AddCharset Big5 .Big5 .big5
| AddCharset WINDOWS-1251 .cp-1251 .win-1251
| AddCharset CP866 .cp866
| AddCharset KOI8-r .koi8-r .koi8-ru
| AddCharset KOI8-ru .koi8-uk .ua
| AddCharset ISO-10646-UCS-2 .ucs2
| AddCharset ISO-10646-UCS-4 .ucs4
| AddCharset UTF-8 .utf8
| AddCharset GB2312 .gb2312 .gb
| AddCharset utf-7 .utf7
| AddCharset utf-8 .utf8
| AddCharset big5 .big5 .b5
| AddCharset EUC-TW .euc-tw
| AddCharset EUC-JP .euc-jp
| AddCharset EUC-KR .euc-kr
| AddCharset shift_jis .sjis
| Include conf/mod-jk.conf
The workers.properties of apache on 192.168.13.2 is:
worker.list=loadbalancer,status
| #JBoss on 192.168.13.26
| worker.node26.port=8009
| worker.node26.host=192.168.13.26
| worker.node26.type=ajp13
| worker.node26.lbfactor=1
| worker.node26.cachesize=10
| #JBoss on 192.168.13.79
| worker.node79.port=8009
| worker.node79.host=192.168.13.79
| worker.node79.type=ajp13
| worker.node79.lbfactor=1
| worker.node79.cachesize=10
| worker.loadbalancer.type=lb
| worker.loadbalancer.balance_workers=node26,node79
| worker.loadbalancer.sticky_session=0
| worker.status.type=status
A part of the configration in server.xml in tomcat of JBoss(192.168.13.26) is :
<Connector port="8080" address="${jboss.bind.address}"
| maxThreads="250" strategy="ms" maxHttpHeaderSize="8192"
| emptySessionPath="true"
| enableLookups="false" redirectPort="8443" acceptCount="100"
| connectionTimeout="20000" disableUploadTimeout="true"/>
| <Connector port="8009" address="${jboss.bind.address}"
| emptySessionPath="true" enableLookups="false" redirectPort="8443"
| scheme="https" protocol="AJP/1.3"/>
| <Connector port="8443" address="${jboss.bind.address}"
| maxThreads="100" strategy="ms" maxHttpHeaderSize="8192"
| emptySessionPath="true"
| scheme="https" secure="true" clientAuth="false"
| keystoreFile="${jboss.server.home.dir}/conf/server.keystore"
| connectionTimeout="8000"
| keystorePass="12345678" sslProtocol = "TLS" />
| <Engine name="jboss.web" defaultHost="localhost" jvmRoute="node26">
I used LoadRunner to record the script of visiting the JSPs in JBoss,and used JProfiler to monitor the JBoss on 192.168.13.26.
I tested three times(50 virtual users visit the JSPs parallely 20 minutes.The CPU time involves the time of starting the JBoss service):
Here is the table of the tests results:
[img]http://lh4.google.com/image/ddpie.flea/RkbUmUVMWKI/AAAAAAAAAAo/o8w1WG...]
If cann't displayed,see http://picasaweb.google.com/ddpie.flea/JBoss/photo#5063968585782417570.
I doubt apache was the bottleneck,but I don?t know where the problem is with my configration of apache.
Does anyone know?
Thanks in advance.^o^
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4045267#4045267
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4045267
19 years, 1 month
[JBoss Seam] - NPE in RepositoryClassLoader
by ollix
I get an exception, that I cannot relate to where it is thrown.
It happens, when I try to read a property of a stateful session bean inside a JSP using the EL. This property is a simple getter inside the component.
The component has an "@In" refrence to the seam identity component, but it is not used inside the getter.
The exception shows up spontaniously - the behaviour is NOT consistent and cannot reliably reproduced.
The same exception happens for the
'#{org.jboss.seam.core.localeSelector}' component.
My first guess is, that the components are not yet instantiated, when the getter is read. But since that happens automagically, I have no idea, what could cause this behaviour.
I hope somebody can give me a hint on where to look for the cause of the exception
Thanks
this is the last part of the stack trace.
| ....
| Caused by: javax.faces.el.EvaluationException: Cannot get value for expression '#{org.jboss.seam.security.identity}'
| at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:402)
| at org.jboss.seam.core.Expressions$1.getValue(Expressions.java:69)
| at org.jboss.seam.Component.getInstanceFromFactory(Component.java:1684)
| at org.jboss.seam.Component.getInstance(Component.java:1633)
| at org.jboss.seam.Component.getInstance(Component.java:1610)
| at org.jboss.seam.Component.getValueToInject(Component.java:1885)
| at org.jboss.seam.Component.injectAttributes(Component.java:1368)
| at org.jboss.seam.Component.inject(Component.java:1195)
| at org.jboss.seam.interceptors.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:46)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
| at org.jboss.seam.interceptors.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:27)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
| at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
| at org.jboss.seam.intercept.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:53)
| at sun.reflect.GeneratedMethodAccessor8647.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
| at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor.invoke(ExtendedPersistenceContextPropagationInterceptor.java:57)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:46)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
| ... 93 more
| Caused by: java.lang.NullPointerException
| at org.jboss.mx.loading.RepositoryClassLoader.findClass(RepositoryClassLoader.java:620)
| at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
| at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:464)
| at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:405)
| at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
| at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
| at org.jboss.seam.jsf.SeamApplication11.getPropertyResolver(SeamApplication11.java:197)
| at org.apache.myfaces.el.ELParserHelper$MyPropertySuffix.evaluate(ELParserHelper.java:532)
| at org.apache.commons.el.ComplexValue.evaluate(ComplexValue.java:145)
| at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:383)
| ... 119 more
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4045263#4045263
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4045263
19 years, 1 month
[JBoss Seam] - Re: seam-head tomcat microcontainer could not start
by lschaffer
following this thread I have downloaded the latest nightly build and tried the booking example in tomcat
result:
08:48:00,537 INFO [SchemaExport] Running hbm2ddl schema export
08:48:00,537 INFO [SchemaExport] exporting generated schema to database
08:48:00,553 INFO [SchemaExport] schema export complete
Failed to initalize plugin: org.jboss.logging.Log4jLoggerPlugin@172aa3f
Failed to initalize plugin: org.jboss.logging.Log4jLoggerPlugin@ac622a
Failed to initalize plugin: org.jboss.logging.Log4jLoggerPlugin@d0726d
Failed to initalize plugin: org.jboss.logging.Log4jLoggerPlugin@1e4f66a
Failed to initalize plugin: org.jboss.logging.Log4jLoggerPlugin@1af0fcf
Failed to initalize plugin: org.jboss.logging.Log4jLoggerPlugin@1d35bf2
Failed to initalize plugin: org.jboss.logging.Log4jLoggerPlugin@65d588
Failed to initalize plugin: org.jboss.logging.Log4jLoggerPlugin@31c43f
Failed to initalize plugin: org.jboss.logging.Log4jLoggerPlugin@17eb767
Failed to initalize plugin: org.jboss.logging.Log4jLoggerPlugin@3b014c
Failed to initalize plugin: org.jboss.logging.Log4jLoggerPlugin@f93ee4
Failed to initalize plugin: org.jboss.logging.Log4jLoggerPlugin@e51960
Failed to initalize plugin: org.jboss.logging.Log4jLoggerPlugin@ada795
Failed to initalize plugin: org.jboss.logging.Log4jLoggerPlugin@433b8a
Failed to initalize plugin: org.jboss.logging.Log4jLoggerPlugin@148ab5c
2007.05.13. 8:48:01 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
2007.05.13. 8:48:01 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
2007.05.13. 8:48:01 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/31 config=null
2007.05.13. 8:48:01 org.apache.catalina.startup.Catalina start
INFO: Server startup in 48875 ms
Exception in thread "IdleRemover" java.lang.NullPointerException
at org.jboss.resource.connectionmanager.IdleRemover$IdleRemoverRunnable
run(IdleRemover.java:177)
at java.lang.Thread.run(Unknown Source)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4045262#4045262
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4045262
19 years, 1 month
[Installation, Configuration & Deployment] - JBoss 4.2 Context.xml docBase ignored?
by xnuandax
Hi all,
We would like to deploy a web context with path "/adad". To do this we placed a directory adad.war/ in jboss/server/default/deploy/, which deployed fine. However we want this web context to serve actual files from elsewhere, as can be done in Tomcat using docBase. To do this we created a "context.xml" file in the WEB-INF directory of "adad.war", as follows:
<?xml version="1.0"?>
| <Context docBase="/srv/images" debug="99" reloadable="true" override="true">
| </Context>
We know JBoss is parsing this context.xml file, as it honours certain attributes. However it never honours the "docBase" instruction, preferring instead to map "localhost:8080/adad/" to the directory inside "adad.war/", instead of the directory "/srv/images" that it is being instructed to serve from...
Any ideas on how to make JBoss-web serve static content files from a docBase elsewhere on the filesystem would be much appreciated!
Many Thanks,
Dave
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4045261#4045261
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4045261
19 years, 1 month
[JBoss Seam] - seam-head tomcat microcontainer could not start
by lschaffer
Hello
I have problem with the seam-head version
UI-example (and my seam-app too) could not be started in tomcat 6. (in previous version has worked)
tomcat log
08:07:14,319 INFO [Lifecycle] starting up: org.jboss.seam.web.ajax4jsfFilter
08:07:14,350 INFO [Lifecycle] starting up: org.jboss.seam.captcha.captchaImage
08:07:49,942 INFO [Lifecycle] starting up: org.jboss.seam.web.exceptionFilter
08:07:49,942 INFO [Lifecycle] starting up: org.jboss.seam.ui.resource.webResour
ce
08:07:49,957 INFO [Initialization] done initializing Seam
2007.05.13. 8:07:49 org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
2007.05.13. 8:07:49 org.apache.catalina.core.StandardContext start
SEVERE: Context [/ui-example] startup failed due to previous errors
Failed to initalize plugin: org.jboss.logging.Log4jLoggerPlugin@11ff451
2007.05.13. 8:07:50 org.apache.coyote.http11.Http11Protocol start
Is there any idea?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4045260#4045260
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4045260
19 years, 1 month
[JBoss Seam] - Re: Unit Testing EL in EJB-QL/HQL
by matt.drees
Yeah, I mock the log object in my unit tests to get around the fact that there is no application context active. It looks like this, and seems to work ok:
| package org.uscm.crs.misc;
|
| import org.jboss.seam.log.Log;
| import org.jboss.seam.log.Logging;
|
| public class MockSeamLogger implements Log {
|
|
| private Log log;
|
| public MockSeamLogger() {
| log = Logging.getLog(MockSeamLogger.class);
| }
|
| public MockSeamLogger(Class clazz) {
| log = Logging.getLog(clazz);
| }
|
|
| private Object clean(Object object) {
| if (object instanceof String) {
| String string = (String) object;
| return string.replace("#{", "{");
| }
| return object;
| }
|
| public void debug(Object object, Object... params) {
| log.debug(clean(object), params);
| }
|
|
| public void debug(Object object, Throwable t, Object... params) {
| log.debug(clean(object), t, params);
|
| }
|
| public void error(Object object, Object... params) {
| log.error(clean(object), params);
| }
|
| public void error(Object object, Throwable t, Object... params) {
| log.error(clean(object), t, params);
|
| }
|
| public void fatal(Object object, Object... params) {
| log.fatal(clean(object), params);
| }
|
| public void fatal(Object object, Throwable t, Object... params) {
| log.fatal(clean(object), t, params);
|
| }
|
| public void info(Object object, Object... params) {
| log.info(clean(object), params);
| }
|
| public void info(Object object, Throwable t, Object... params) {
| log.info(clean(object), t, params);
|
| }
|
| public boolean isDebugEnabled() {
| return true;
| }
|
| public boolean isErrorEnabled() {
| return true;
| }
|
| public boolean isFatalEnabled() {
| return true;
| }
|
| public boolean isInfoEnabled() {
| return true;
| }
|
| public boolean isTraceEnabled() {
| return true;
| }
|
| public boolean isWarnEnabled() {
| return true;
| }
|
| public void trace(Object object, Object... params) {
| log.trace(clean(object), params);
| }
|
| public void trace(Object object, Throwable t, Object... params) {
| log.trace(clean(object), t, params);
| }
|
| public void warn(Object object, Object... params) {
| log.warn(clean(object), params);
| }
|
| public void warn(Object object, Throwable t, Object... params) {
| log.warn(clean(object), t);
| }
|
| }
|
I'm definitely interested to hear if anyone else has found useful patterns for unit testing. I'm wondering if it'd be worth it to simply set up the Application context manually; it might be lightweight enough to be reasonable in a unit test.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4045259#4045259
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4045259
19 years, 1 month