[Design of Messaging on JBoss (Messaging/JBoss)] - Number of threads per jms client connection
by bartvh
I realize this is the developers forum, and not a place to ask user questions, but I think this one is indeed much more design related.
Because in our setup we have a 'gateway'-like jms client that needs to create many sessions, we need to be careful about the resources a jms client connection/session needs. I was looking at the number of threads that are created per connection, per session, ...
I noticed that each connection creates two threads : a "control: Socket[....]" thread and a "Timer-..." thread.
I can see understand that the first one is unavoidable without a complete rewrite of jboss-remoting to use nio and select.
The second timer thread should be easier to avoid: such a thread is created because each connection creates a java.util.Timer object. However, I don't think there is a real reason to create a new Timer object each time; according to the java api docs, a Timer object is capable of handling many scheduled tasks as long as the tasks finish quick.
Now, after stopping one of the nodes of the cluster, I see the number of threads increase: there are new threads called " WorkerThread#..[....]" with the following stack trace:
java.net.SocketInputStream.socketRead0(Native Method)
java.net.SocketInputStream.read(SocketInputStream.java:129)
java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
java.io.BufferedInputStream.read(BufferedInputStream.java:235)
java.io.FilterInputStream.read(FilterInputStream.java:66)
org.jboss.remoting.transport.socket.ServerThread.readVersion(ServerThread.java:810)
org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:506)
org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:383)
org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:165)
This looks rather odd for a jms client. Is this the callback channel of the bi-socket protocol?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4072418#4072418
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4072418
18 years, 8 months
[Design of JBoss Portal] - Redirect in a PageInterceptor renders the page in background
by staale
I tries posting this question in the jboss forum - but didnt get any replies. So ill try here as well:
Im using jboss portal 2.2.2 with jboss as 4.0.4 GA on a debian linux server.
We are using a PageInterceptor to switch pages from http to https, so we dont have to rewrite all urls.
The property to make a page https is written in a page attribute.
When the request hits the PageInterceptor we check if the request should be secure or not - and do a redirect to a secure or no-secure url if it is of the wrong type.
All this is good, and it seems to work perfectly. But i see from the logs - that when i do a redirect in the PageInterceptor - the request is being ran anyway.
Here is a snip of code that runs in the PageInterceptor.
Code:
| final String hostName = getRedirectHost(viaHeaderField, httpRequest.getServerName(), false);
| final String redirectURL = createRedirectURL(httpRequest, PROTOCOL_HTTP, hostName);
| sendRedirect(pageInvocation, redirectURL);
| pageInvocation.invokeNext();
|
What I could use is a command to stop rendering the page in the pageInterceptor, but if i dont call pageInvocation.invokeNext(); the portal fails.
Can anyone help me ?
Regards,
Ståle
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4072387#4072387
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4072387
18 years, 8 months
[Design of JBoss Web Services] - dump message logging based on Mbean
by maeste
Looking at some issues about redirection of message logging made by cxf or metro, I thought that these feature can be ignored in favor of a more general message dumping. With this approach we would have an unique configuration (independent from the stack) to enable message dumping, we would have message dumping also for native stack, and moreover we can made something more sophisticated than simple dumping (for example start and stopping dynamically, or saving somewhere messages for a time frame to analyze it).
My idea is to make an MBean doing the job (receiving servlet request response, logging messages, eventually making something more with them) invoked by RequestHandler. Of course RequestHandler have to become an abstract class (now it is an interface) and some refactoring is needed.
Moreover users have a single configuration to change to dump messages not depending from the stack used, and the behaviour can be changed runtime from jmx-console.
Any opinion about?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4072382#4072382
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4072382
18 years, 8 months
[Design of JBoss Profiler] - JBoss Profiler 2
by jesper.pedersen
JBoss Profiler 2 will be a 100% Java based profiler capable of profiling Java Enterprise 5 applications.
The profiler will use the java.lang.instrument API to hook into method invocations of the classes selected in the configuration.
Overview:
| * 100% Pure Java
|
| | x Memory storage for snapshots
| | x File storage for snapshots
| |
|
| * Integration with JBoss Enterprise Middleware Suite (JEMS)
|
| | x Ability to change configuration at run-time
| |
|
| * Access through multiple protocols using JBoss Remoting
|
| | x Socket
| | x RMI
| | x HTTP
| |
|
| * Reports
|
| | x Overview
| | x Classes
| | x Hotspots
| | x PerThread
| | x PerClass
| |
|
| * Able to specify method visibility
|
| | x Global
| | x Package
| | x Class
| |
|
| * Component identification
|
| | x Plain Old Java Object (POJO)
| | x java.lang.Throwable
| | x Enterprise JavaBean: Entity
| | x Enterprise JavaBean: Session
| | x Enterprise JavaBean: Message
| | x Servlet
| | x Servlet filter
| | x JavaServer Pages
| | x JMX MBean
| | x JavaServer Faces Converter
| | x JavaServer Faces Managed Bean
| | x RMI: Remote
| | x RMI: Server
| | x CORBA: Object
| | x CORBA: Servant
| | x Other: Using component identification plugins
| |
|
| * Client
|
| | x Command line
| | x Seam web client
| | x Administration console
| |
|
|
| The profiler is split into the following components:
|
| | * Agent : Collects the profiling information
| | * Shared: Shared classes between the agent and clients
| | * Connectors: Classes needed for communication
| | * AS: Classes needed for AS integration
| | * Client: Client implementations
| |
|
| The API between client and agent:
|
| | * startProfiler: Start the profiler
| | * stopProfiler: Stop the profiler
| | * snapshot: Take a snapshot
| | * getSnapshot: Get a snapshot
| | * listSnapshots: List snapshots
| | * clearSnapshots: Clear snapshots
| | * gc: Trigger garbage collection
| | * enable: Enable the profiler
| | * disable: Disable the profiler
| | * load: Load a snapshot
| | * save: Save a snapshot
| |
|
| Additional client functionality:
|
| | * Snapshot difference
| | * Call-stack analyzer
| |
|
| The profiler targets JBoss Application Server 4.2 and 5.0, since it requires a Java 5 run-time environment. The profiler must also be able to profile standalone applications or frameworks.
|
| A Proof-of-Concept has been implemented along these lines.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4072334#4072334
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4072334
18 years, 8 months