[JBoss Web Services] - Client handler invocation issue
by Gary Brown
Gary Brown [http://community.jboss.org/people/objectiser] created the discussion
"Client handler invocation issue"
To view the discussion, visit: http://community.jboss.org/message/574024#574024
--------------------------------------------------------------
Hi
I am setting up a client handler in the jbossws.deployer/META-INF/standard-jaxws-client-config.xml, as follows:
<client-config>
<config-name>Standard Client</config-name>
<pre-handler-chains>
<javaee:handler-chain>
<javaee:protocol-bindings>##SOAP11_HTTP</javaee:protocol-bindings>
<javaee:handler>
<javaee:handler-name>SAVARA JBossWS-Native Service Validator Interceptor</javaee:handler-name>
<javaee:handler-class>org.savara.validator.jbosswsnative.JBossWSNativeClientInterceptor</javaee:handler-class>
</javaee:handler>
</javaee:handler-chain>
</pre-handler-chains>
<feature>http://org.jboss.ws/dispatch/validate</feature>
<property>
<property-name>http://org.jboss.ws/http#chunksize</property-name>
<property-value>2048</property-value>
</property>
</client-config>
I then have a BPEL process running in RiftSaw that calls two separate JAX-WS services, one after the other. The first invocation does not cause the client handler to be created/invoked, but the second invocation does.
I have attached the log file from the server, with the relevant points commented with the prefix "NOTE:".
Any pointers as to why the invocations are being treated differently. If more debug is required let me know - currently set debug on org.jboss.ws and org.jboss.wsf.
Regards
Gary
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/574024#574024]
Start a new discussion in JBoss Web Services at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years
[Performance Tuning] - Terrible performance with lot of concurrent ejb calls - SecurityActions.loadClass
by Maros Bajtos
Maros Bajtos [http://community.jboss.org/people/maros.bajtos] created the discussion
"Terrible performance with lot of concurrent ejb calls - SecurityActions.loadClass"
To view the discussion, visit: http://community.jboss.org/message/574074#574074
--------------------------------------------------------------
Let me start with some background. Last few days I spent with profiling JBoss (5.1.0 with EJB plugin 1.0.19) and fixing our performance problems. We develop BPM solution based on standard J2EE technologies (JPA, EJB, JSF, etc) and we have a lot of tests set up. These tests runs on regular basis, every night on each of 4 application servers - Glassfish, Websphere, Weblogic, JBoss. First three servers performs quite well, the times are around 90 minutes. However JBoss never do it in less than 5 hours.
Our application use EJBs heavily, so one call from web interface may result in more than 100 underlying ejb calls (I don't know how many exactly). I am not here to judge, whether this is good pattern or not. As I said I end up profiling JBoss (not our application) and realized few things:
Most of the time is spent in these methods:
org.jboss.ejb3.security.RoleBasedAuthorizationInterceptorv2.invoke
org.jboss.ejb3.security.Ejb3AuthenticationInterceptorv2.invoke
These are interceptors around ejbs, which should authenticate caller and process any security contraints and ensure that caller has permission to invoke target method. Now the problem is we don't use standard ejb security at all - therefore by default all users are permitted to call any method. That's why I would expect that method org.jboss.ejb3.security.RoleBasedAuthorizationInterceptorv2.invoke should just return or something equivalent. However, apparently it does perform some work.
After running our performance tests on jboss, I realized that there is lot of problems and one request often take more than 20 seconds (sometimes even 4 minutes). On the other application servers it take around 2 seconds. Pretty bad. Moreover, my profiler tool showed me that there is lot of threads spending their time blocked in mentioned methods.
To sum it up, the cause of the performance problem is in authorization code, which shouldn't even be invoked, since we don't have any restrictions on our ejb methods.
The problem as I found out is that with every(!) ejb invocation, ClassLoader.loadClass(String) is called. This is a sample trace (it is called also in other places):
org.jboss.ejb3.security.RoleBasedAuthorizationInterceptorv2.invoke
SecurityHelperFactory.getEJBAuthorizationHelper
SecurityActions.loadClass
ClassLoader.loadClass
If you check source of ClassLoader.loadClass(String), you can see that ClassLoader.loadClass(String,boolean) is called and this method is synchronized, i.e results in block other threads calling it before the current thread leaves.
So I have 3 questions:
1. Is it necessary to use ClassLoader.loadClass method? Why don't you use Class.forName() instead, which is (as far as I know) non-blocking?
2. Why don't you just skip authorization of method if it has PermitAll annotation (or there is no annotation at all)
3. Can I somehow turn off RoleBasedAuthorizationInterceptorv2?
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/574074#574074]
Start a new discussion in Performance Tuning at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years
[jBPM] - Re: jBPM 4.4 demo.setup.tomcat (task -> install.jbpm.into.tomcat)
by Andrzej Kulakowski
Andrzej Kulakowski [http://community.jboss.org/people/zigfryd] created the discussion
"Re: jBPM 4.4 demo.setup.tomcat (task -> install.jbpm.into.tomcat)"
To view the discussion, visit: http://community.jboss.org/message/574195#574195
--------------------------------------------------------------
I have managed to bypass this error, to be precise complete step "install.examples.into.tomcat" by doing following steps:
1) reinstall/start Tomcat and make sure CATALINA_HOME was set to the right Tomcat installation ( in my case i have three Tomcat's on my comp for different software etc.. ); Yeah that's right, Tomcat is supposed to be stopped according to the guide - weird huh :-/
2) also i repeated the step "create.jbpm.schema" by calling ant from install dir
3) also steps: "install.examples.into.tomcat" and "load.example.identities"
4) I think I have restarted Tomcat at this point though I am not sure, but suffice to say that all ant build tasks done separately have succeeded.
I understand that these steps have little to no rationale behind them, but out of pure trial&error approach I gave it a try and who knew - it helped :-/
So far, I have yet to bypass another problem which is the empty list under the "Share repository" in jBPM Signavio designer - those objects you oght to drag and construct the diagram with are simply not there. I am going to analyze jBPM Developer's guide for clues, but it would be helpful if anyone could give me some insight to this matter?
Cheers,
Andrzej
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/574195#574195]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years
[JBoss Messaging] - JDBCPersistenceManager will crash by design ?
by Tim Coninx
Tim Coninx [http://community.jboss.org/people/timconinxrvp] created the discussion
"JDBCPersistenceManager will crash by design ?"
To view the discussion, visit: http://community.jboss.org/message/574084#574084
--------------------------------------------------------------
I posted in another discussion about having to remove messages by hand from our oracle db. But now we found the problem behind this necessity.
The context is that we sometimes have to 'DELETE FROM JBM_MSG_REF' when messages still exist in a queue, because when a server tries to start the queue, he fails with:
java.sql.SQLException: Invalid column index
The reason behind this is as follows:
- in the persistence-service.xml (in our case the one for oracle), a SELECT query is defined as:
LOAD_UNPAGED_REFS=SELECT MESSAGE_ID, DELIVERY_COUNT, SCHED_DELIVERY FROM JBM_MSG_REF WHERE STATE = 'C' AND CHANNEL_ID = ? AND PAGE_ORD IS NULL ORDER BY ORD
- in the supported JDBCPersistenceManager in jboss-messaging (version 1_4_6_GA) the following code appears in the method loadFromStart(long, int)
| 982 | ps = conn.prepareStatement(getSQLStatement("LOAD_UNPAGED_REFS")); |
| 983 |
|
| 984 | ps.setFetchSize(number); |
| 985 |
|
| 986 | ps.setLong(1, channelID); |
| 987 |
|
| 988 | rs = ps.executeQuery(); |
| 989 |
|
| 990 | List<ReferenceInfo> refs = new ArrayList<ReferenceInfo>(); |
| 991 |
|
| 992 | List<ReferenceInfo> refsToUpdate = new ArrayList<ReferenceInfo>(); |
| 993 |
|
| 994 | int count = 0; |
| 995 | boolean inMemSwitch = false; |
| 996 | boolean nonPageFlag = true; |
| 997 | while (rs.next()) |
| 998 | { |
| 999 | rs.getObject(4); |
| 1000 | inMemSwitch = rs.wasNull(); |
| 1001 | if (nonPageFlag && (!inMemSwitch)) |
| 1002 | { |
| 1003 | nonPageFlag = false; |
| 1004 | } |
I have no idea what the use of 'inMemSwitch' is (it will be ignored because nonPageFlag is always true), or how it is set. But the result of this is that when there are message entries in our queues from a previous run, the startup code for that queue WILL crash (4 > 3).
What am I supposed to do now ? I can't just upgrade because we're under support contract for this version.
Or am I missing something ?
Thanks in advance for any helpful replies !
Tim
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/574084#574084]
Start a new discussion in JBoss Messaging at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years
[jBPM] - jBPM Java Consultant
by Jason Biser
Jason Biser [http://community.jboss.org/people/jasonbiser] created the discussion
"jBPM Java Consultant"
To view the discussion, visit: http://community.jboss.org/message/574158#574158
--------------------------------------------------------------
Apex Systems Inc is currently seeking a jBPM Java Developer Consultant in Philadelphia, PA. If interested please reach out to Jason Biser at mailto:jbiser@apexsystemsinc.com jbiser(a)apexsystemsinc.com for more details.
Java Developer
Financial/Banking Client
Philadelphia, PA
12-18 Month Contract
*Candidate Must Posses: Strong Core Spring, Hibernate and strong jBPM, SEAM, JSF, and JMS experience to be considered*
The candidate will be expected to play a significant role in the coding and unit testing of business, data access, and user interface logic for a high-profile financial application delivered over the web and through a back end messaging infrastructure. Substantial experience is expected in a variety of back- and front-end enterprise Java technologies, On the back end, the desired technologies include Spring, Spring Integration, Hibernate, jBPM, JMS, Web Services, JDBC, and JTA. Desired front end technologies include SEAM, RichFaces, JSF, and AJAX. Database experience with Oracle and MySQL also is desired. Strong debugging and testing skills along with experience with JUnit, Maven, and Eclipse. Database experience with Oracle and MySQL also is desired. A background in financial services will be a plus.
Jason Biser
Senior Professional Recruiter
Apex Systems Inc
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/574158#574158]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years