[Security & JAAS/JBoss] - How to read application-policy at runtime?
by chriscorbell
I'm using the default login-config.xml for server policy configuration with JBoss 4.0.5. There's just a single application-policy defined, for Kerberos.
I'd like to read this policy from within a service method - this is primarily to detect a bad configuration (e.g. an SPN with a hostname/IP component that doesn't match the current host) and give better guidance to the server administrator through logging and a more specific exception that can cue the admin client to put up helpful instructions.
I could go out and parse the login-config.xml from the filesystem, but presumably there's a way to get a PolicyConfig object or similar representation of the configured policy and inspect its module-option settings in code; I'd prefer to do that.
Can anyone tell me how to get there from here?
Thanks.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4227868#4227868
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4227868
15 years, 7 months
[JBossWS] - Using StubExt.PROPERTY_CLIENT_TIMEOUT to control timeout of
by jamesjoh
I'm using the native jbossws jax-ws 2.0 implementation. I want to control the timeout on a request I am making to a customer's web service. After searching I found out about setting the property
StubExt.PROPERTY_CLIENT_TIMEOUT
on the request context, which I get from my Dispatch object. I set the timeout to 120 seconds (120000 milliseconds). Though my request timed out much quicker than the default timeout, it actually took about 5 minutes for it to time out. The exception thrown said it timed out after "120000ms" but the log entries for the request start & timeout exception are 5 minutes apart. I dropped it down to 90 seconds and it took roughly 4 minutes to time out. Is there something magic about this property that the desired timeout is not being honored? Clearly the property is being used in SOME capacity to control the timeout, it just isn't actually timing out at the desired time. Does anyone have any insight into why this is? Thank you in advance for your time.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4227867#4227867
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4227867
15 years, 7 months
[Performance Tuning] - Our Active Thread Count is over 20 000. Surely this is a pro
by ksaloojee
We are doing performance testing in our UAT environment and our active thread count keeps on rising and has hit over 20 000. It never comes down, even when we stop putting load on the server. This appears to be too high in my opinion.
We are migrating an application from Weblogic to JBoss. The application uses EJB 2.x session beans, entity beans, DAO's and JMS. The client is a Swing UI (i.e. fat client) that communicates with the server via RMI and JMS.
I have dumped the threads on the server and what I have noticed is that the majority of them are:
"UIL2.SocketManager.WriteTask#385 client=10.198.8.23:8093" daemon prio=10 tid=0x00002aaecc161400 nid=0x3054 in Object.wait() [0x000000007a143000..0x000000007a143d90]
| java.lang.Thread.State: WAITING (on object monitor)
| at java.lang.Object.wait(Native Method)
| - waiting on <0x00002aae94e14fc0> (a java.lang.Object)
| at java.lang.Object.wait(Object.java:485)
| at EDU.oswego.cs.dl.util.concurrent.LinkedQueue.take(LinkedQueue.java:122)
| - locked <0x00002aae94e14fc0> (a java.lang.Object)
| at org.jboss.mq.il.uil2.SocketManager$WriteTask.run(SocketManager.java:518)
| at java.lang.Thread.run(Thread.java:619)
That tells me that something JMS related is hogging threads. In addition to that the logs also display a lot of JMS warnings:
2009-04-30 15:15:36,102 WARN [org.jboss.mq.Connection] Connection failure, use javax.jms.Connection.setExceptionListener() to handle this error and reconnect
| org.jboss.mq.SpyJMSException: No pong received; - nested throwable: (java.io.IOException: ping timeout.)
| at org.jboss.mq.Connection$PingTask.run(Connection.java:1313)
| at EDU.oswego.cs.dl.util.concurrent.ClockDaemon$RunLoop.run(ClockDaemon.java:364)
| at java.lang.Thread.run(Thread.java:619)
| Caused by: java.io.IOException: ping timeout.
That I know how to fix thanks to http://www.jboss.org/community/docs/DOC-10000 and is also JMS related.
Is our thread count too high? Has anyone experienced anything similar with JMS where it hogs threads? Do you think that JMS is the problem or is it a red herring that is taking away attention from something else?
TIA
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4227865#4227865
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4227865
15 years, 7 months
[Clustering/JBoss] - Cluster and SSL (JRMPInvokerHA and RMISSLServerSocketFactory
by carbonch
Hello everybody
I'm trying to set up a cluster with SSL. I made my own container-configuration extended from "Clustered Stateless SessionBean" and added the SSL stuff as you can see below
| <container-configurations>
| <container-configuration extends="Clustered Stateless SessionBean">
| <container-name>MY_CONTAINER_NAME</container-name>
| <invoker-proxy-binding-name>my-invoker-proxy-binding-name</invoker-proxy-binding-name>
| </container-configuration>
| </container-configurations>
|
| <invoker-proxy-bindings>
|
| <invoker-proxy-binding>
| <name>my-invoker-proxy-binding-name</name>
| <invoker-mbean>jboss:service=invoker,type=jrmpha,socketType=SSL</invoker-mbean>
| <proxy-factory>org.jboss.proxy.ejb.ProxyFactoryHA</proxy-factory>
| <proxy-factory-config>
| <client-interceptors>
| <home>
| <interceptor>org.jboss.proxy.ejb.HomeInterceptor</interceptor>
| <interceptor>org.jboss.proxy.SecurityInterceptor</interceptor>
| <interceptor>org.jboss.proxy.TransactionInterceptor</interceptor>
| <interceptor call-by-value="false">org.jboss.invocation.InvokerInterceptor</interceptor>
| <interceptor call-by-value="true">org.jboss.invocation.MarshallingInvokerInterceptor</interceptor>
| </home>
| <bean>
| <interceptor>org.jboss.proxy.ejb.StatelessSessionInterceptor</interceptor>
| <interceptor>org.jboss.proxy.SecurityInterceptor</interceptor>
| <interceptor>org.jboss.proxy.TransactionInterceptor</interceptor>
| <interceptor call-by-value="false">org.jboss.invocation.InvokerInterceptor</interceptor>
| <interceptor call-by-value="true">org.jboss.invocation.MarshallingInvokerInterceptor</interceptor>
| </bean>
| </client-interceptors>
| </proxy-factory-config>
| </invoker-proxy-binding>
|
| </invoker-proxy-bindings>
|
... and the service...
| <mbean code="org.jboss.invocation.jrmp.server.JRMPInvokerHA"
| name="jboss:service=invoker,type=jrmpha,socketType=SSL">
| <attribute name="ServerAddress">${jboss.bind.address}</attribute>
| <attribute name="RMIObjectPort">14445</attribute>
| <attribute name="RMIClientSocketFactory">org.jboss.security.ssl.RMISSLClientSocketFactory</attribute>
| <attribute name="RMIServerSocketFactory">org.jboss.security.ssl.RMISSLServerSocketFactory</attribute>
| <attribute name="SecurityDomain">java:/jaas/MY-SSL</attribute>
| <depends>jboss:service=Naming</depends>
| <depends>jboss.security:service=JaasSecurityDomain,domain=MY-SSL</depends>
| </mbean>
If I'm trying to look up my beans the client just hangs. Did I miss something? It works fine if I disable SSL by removing the attributes "RMIClientSocketFactory" and "RMIServerSocketFactory". Is the combination of JRMPInvokerHA and RMISSLServerSocketFactory possible or is there a special factory for HA?
By the way, I'm still using JBoss 4.0.3 SP1.
Thank you for your hints.
kindest regards,
Reto
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4227855#4227855
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4227855
15 years, 7 months
[JBoss jBPM] - Re: Mutiple timers in a task node problem
by Tal
Hi,
I've created an example process, one task node, two timers on it which represents two sla timers (i.e. should invoke an action that will send a reminder to the task actor if not acting on time), what happens is the same, first one is executed, second one is not, still the same differences in the database:
<?xml version="1.0" encoding="UTF-8"?>
<process-definition xmlns="" name="example">
example_process
<start-state name="start-state1">
</start-state>
<task-node name="task-node1">
<assignment actor-id="ADMIN">
<action name="action1" expression="#{wfAction.write('Action #1 invoked')}
">
<action name="Action2" expression="#{wfAction.write('Action #2 invoked')}
">
</task-node>
<end-state name="end-state1"></end-state>
</process-definition>
***************
The WfAction class:
@Name("wfAction")
public class WfAction {
public void write(String s) {
System.out.println(s);
}
}
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4227854#4227854
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4227854
15 years, 7 months