[Messaging, JMS & JBossMQ] - InProcessMessageCount
by anant
I have an application that sends several JMS messages to a queue with one MDB that listens for messages on that queue. Under heavy loads (hundreds of messages being sent) I notice that the queue fills up. This is expected since the work associated with the MDB could take some time (the rate at which messages are processed is slower than the rate they are being added to the queue). CPU utilization is not at 100% when this is happening. I noticed that the InProcessMessageCount reaches 16 when this occurs and the QueueDepth begins to increase (and subsequently decreases once messages stop being sent). My questions are why the InProcessMessageCount always reaches 16, and if this value can be changed. I would think that this limit would be bounded by the resources of the machine it is running on, but it doesn't seem to be the case. It always stops at 16.
TIA
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4118902#4118902
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4118902
18 years, 3 months
[Security & JAAS/JBoss] - Re: Can I create a login .war module that my other .war modu
by ragavgomatam
Answer is no. Make it a Custom Jaas Module & sprinkle <security-constraint>
| <web-resource-collection>
| <web-resource-name>SecurePages</web-resource-name>
| <description>
| Security constraint testing using custom Jaas Module
| </description>
| <url-pattern>/jsp/secure.jsp</url-pattern>
| <http-method>POST</http-method>
| <http-method>GET</http-method>
| </web-resource-collection>
| <auth-constraint>
| <description>Only let the authenticated users login</description>
| <role-name>admin</role-name>
| <role-name>webAdmin</role-name>
| </auth-constraint>
| <user-data-constraint>
| <description>Determines the transport layer security</description>
| <transport-guarantee>NONE</transport-guarantee>
| </user-data-constraint>
| </security-constraint>
| <login-config>
| <auth-method>BASIC</auth-method>
| <realm-name>JaasRealm</realm-name>
| </login-config>
| <security-role>
| <description>The Only Secure Role</description>
| <role-name>admin</role-name>
| </security-role>
| <security-role>
| <description>Another Secure Role</description>
| <role-name>webAdmin</role-name>
| </security-role> tags in your web.xml and
<security-domain>java:/jaas/MyJaas</security-domain>
jboss-web.xml. You are set.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4118900#4118900
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4118900
18 years, 3 months
[Security & JAAS/JBoss] - Re: Capturing client IP address
by ragavgomatam
One answer would be writing a Tomcat Valve that intercepts every HttpRequest before it make it to the container. This valve would intercept the request before your login module. I have given an example implementation. Package this in tomcat.sar , & check out how to configure this in jboss & you are set to go. Should not be too difficult
package test.tomcat;
|
| import java.io.IOException;
| import java.util.ArrayList;
| import java.util.List;
| import java.util.StringTokenizer;
|
| import javax.servlet.ServletException;
| import javax.servlet.http.HttpServletRequest;
|
| import org.apache.catalina.*;
|
| /**
| * The Tomcat valve that transfers credentials into a Principal object,
| * to provide seamless integration between Jaas and the J2EE security model.
| */
|
| public class MyValve implements Valve {
|
| public String getInfo() {
| return null;
| }
|
|
| /**
| * Looks for the Http headers in the originating request and creates a
| * Principal representing these if they exist.
| */
|
| public void invoke(Request request, Response response, ValveContext valveContext)
| throws IOException, ServletException {
|
| // Ha ! Ha !...Got the request before it makes it to Login Module...
|
| HttpRequest httpRequest = (HttpRequest)request;
| HttpServletRequest httpServletRequest = (HttpServletRequest)request.getRequest();
| List roles = new ArrayList();
| String username = (String)httpServletRequest.getHeader("myHeader");
| String rolesAsString = (String)httpServletRequest.getHeader("myList");
|
| StringTokenizer tok = new StringTokenizer(rolesAsString, ",");
| while (tok.hasMoreTokens()) {
| String token = tok.nextToken().trim();
| roles.add(token);
| }
|
| httpRequest.setUserPrincipal(new MyPrincipal(
| httpRequest.getContext().getRealm(), username, roles));
|
| // now execute all other valves
| valveContext.invokeNext(request, response);
| }
|
| }
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4118899#4118899
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4118899
18 years, 3 months
[JBoss Tools (users)] - Re: Ant Task not dependent upon Eclipse plugins
by rob.stryker@jboss.com
Great job, wcrossman =D
In my own defense, the current ant task doesn't need the eclipse build system ;) It just needs some jars from the archives.core plugin, and 1 eclipse jar ;)
And it turns out only 1 class is needed from that eclipse jar, IPath =D
Just for further information, the build process itself in archives.core does not look once at what type of package it is (jar, ear, war, sar, etc). It doesn't affect the build process one way or the other.... as of now. There may be extensions in the future that allow other actions to be performed before or after.
Either way, great contrib. In the future I'll be trying to clean up the ant task entry point a bit, and if it's ok with you I may consider your code when doing so?
- Rob
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4118888#4118888
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4118888
18 years, 3 months
[JBoss Seam] - JbpmContext Transaction begin not detected
by jcarlos_andia
Hi everybody.
I have a workflow to approve users, for that I have a method with the annotation @CreateProcess that creates a ProcessInstance, which works well (creates a processInstance with no problem). In a second method I need to update the first taskInstance of the processInstance created, for that I injected the @JbpmContext jbmContext so I can make jbmContext .save(taskInstance) and now I can not create a process the error is "Transaction begin not detected, try installing transaction:ejb-transaction in components.xml". When I add an entry like this:
<transaction:ejb-transaction/>
It throws an error when starting the server stating that the entry transaction is not bound.
I also try not injecting the JbpmContext and create it from jbpmConfiguration (jbpmConfiguration.createJbpmContext) but it appears an error saying "Illegal attempt to associate a collection with two open sessions".
I have been going around doing session.merge, beginning transactions, closing a session and open it againg, etc. and nothing works. I would like to know what I am doing wrong with injecting the JbpmContext, or with creating the jbpmContext from jbpmConfiguration, or if there is another way to save a jbpm component.
All this stuff is within a SFSB with a scope of BusinessProcess. The funny part is that all this was working when I called its methods from another SFSB (the creation of the process and the updating of the task instance) but I had to change that and call my method from within my SFSB since its functionality is going to be used from various components.
I'm using Seam 2.0GA with Jboss-4.2.2.GA.
Thanks in advance.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4118884#4118884
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4118884
18 years, 3 months