[Performance Tuning] - Re: Low performance of jboss in windows server 2003
by PeterJ
Yes, JBossAS creates a thread for each HTTP connection. You can adjust the maximum number of threads allowed. See http://tomcat.apache.org/tomcat-5.5-doc/config/http.html, look for maxThreads amd acceptCount.
You can set up hundreds of connections in the MySQL connection pool, though in your setup I would recommend perhaps 20-50 connections. JBossAS will establish as many connections as there are simultaneous requests to the database. One way to tell how many connections you need is to allow hundreds of connections, run your test, and use the JMX Console to monitor the number of connections in use. Of course, the more connections you have the more memory MySQL will use. Once you decide on the number of connections, set max-pool-size in your *-ds.xml file, and max_connections in your my.ini file, to the same value.
Because JBossAS and MySQL are on the same virtual machine, you will need to assign more memory to the virtual machine. You should also adjust the MySQL memory settings.
You don't have a desktop system, or even a laptop, that you could try it on? It doesn't have to be running Server 2003, XP would be fine. Even Vista would do in a pinch.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4142793#4142793
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4142793
18 years
[JBoss Portal] - wsrp_rewrite usage
by esmith1
Using JBAS 4.2.2 and Portal 2.6.4. I would like to use the WSRP_REWRITE functionality as described in the reference manual 24.6.1,
anonymous wrote :
| As a result of this, the token to use for rewrite is the WSRP specified "wsrp_rewrite_". If the portlet sets the following response property
|
| res.setProperty("WSRP_REWRITE","true");
| all occurrences of the wsrp_rewrite_ token in the portlet fragment will be replaced with a unique token (the window id). If the portlet also specifies content to be injected into the header of the page, that content is also subject to this rewrite.
|
| res.setProperty("HEADER_CONTENT", "
| function wsrp_rewrite_OnFocus(){alert('hello button');}
| ");
|
|
But when I "view page source" of the portlet content after rendering I am still seeing the wsrp_rewrite_ tokens, not the window id replacement. Am I missing something?
| protected void doView(RenderRequest rRequest, RenderResponse rResponse) throws PortletException, IOException, UnavailableException
| {
| rResponse.setContentType("text/html");
| rResponse.setProperty("WSRP_REWRITE","true");
| rResponse.setProperty("HEADER_CONTENT", "<script>function wsrp_rewrite_OnFocus(){alert('hello button');}</script>");
|
| PortletRequestDispatcher prd = getPortletContext().getRequestDispatcher("/WEB-INF/jsp/view.jsp");
| prd.include(rRequest, rResponse);
| }
|
and view.jsp
| <%@ taglib uri="http://java.sun.com/portlet" prefix="portlet" %>
|
| <portlet:defineObjects/>
|
| <script>
| var wsrp_rewrite_mygrid='TEST REWRITE';
| </script>
| Hello Rewrite Test Portlet
|
source produced
| ...
| <link rel="icon" type="image/gif" href="/portal-core/themes/renaissance/images/animated_favicon1.gif" />
|
| <!-- insert header content that was possibly set by portlets on the page -->
| <script>function wsrp_rewrite_OnFocus(){alert('hello button');}</script>
|
| </head>
|
| <body id="body">
|
| ...
|
| <script>
| var wsrp_rewrite_mygrid='TEST REWRITE';
| </script>
| Hello Rewrite Test Portlet</div></div></td><td class="portlet-content-right"></td></tr><tr>
| ...
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4142791#4142791
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4142791
18 years
[JBoss Messaging] - Re: Message redistibution between 2 MDB's
by clebert.suconic@jboss.com
The ClusterRoundRobingDistributor aways favour the local queue on the Cluster.
public Delivery handle(DeliveryObserver observer, MessageReference ref, Transaction tx)
| {
| //First try the local distributor
|
| if (trace) { log.trace(this + " first trying with local distributor"); }
|
| Delivery del = localDistributor.handle(observer, ref, tx);
|
| if (trace) { log.trace(this + " local distributor returned " + del); }
|
|
So.. if you have your MDB on ServerA and Producer on ServerA, the MDB on ServerA will aways receive the messages.
If you were sending to a ServerC with no consumers on it, then the load would be balanced between ServerA and B.
If you need that kind of load, you could be using two producers, on two distinct connections created by a ClusteredConnectionFactory.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4142789#4142789
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4142789
18 years