[Design of JBoss jBPM] - running the test suite on spring
by tom.baeyens@jboss.com
2 parts of the puzzle are already figured out:
1) Configuration delegates to a subclass internally. So
new Configuration("spring")
creates and delegates to a SpringConfiguration, which can build a specialized SpringProcessEngine
2) Maven properties are passed as system properties. So
public class PropertyTest extends TestCase {
|
| public void testProperty() {
| System.out.println(System.getProperty("jbpm.cfg.type"));
| }
|
| }
|
can be run like this
C:\wsjbpm4\jbpm4\modules\test-pojo>mvn -Dtest=PropertyTest -Djbpm.cfg.type=spring clean test
|
| ...
|
| Running org.jbpm.test.activities.PropertyTest
| spring
| Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.047 sec
|
| Results :
|
| Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
|
| [INFO] ------------------------------------------------------------------------
| [INFO] BUILD SUCCESSFUL
| [INFO] ------------------------------------------------------------------------
| ...
|
what else do we need ?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4222216#4222216
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4222216
15 years, 9 months
[Design of Messaging on JBoss (Messaging/JBoss)] - SecurityChecks on Sends (AsyncSend & createProducer)
by clebert.suconic@jboss.com
Two questions:
First: createProducer doesn't do any security checks, as there is nothing being created on Server for a producer, but shouldn't we do a round-trip just to validate security?
Second: (Assuming createProducer would throw an exception if no-security):
Say you are sending messages (Asynchronously), and you don't have sending permissions... (or you lost permissions after the createProducer). The serverSide will ignore the sends and will only log those errors.
Shouldn't we save exceptions on Async operations, so the next time a Sync operation come (commit, prepare, close) we throw the pending exceptions would validate for past exception and fail the client?
For instance: ATM if you don't have security privileges to send, Prepare is not failing.
The following test is failing:
prod = sendingSession.createProducer(addressA);
| prod.send(createTextMessage(sendingSession, "Test", true));
| prod.send(createTextMessage(sendingSession, "Test", true));
| sendingSession.end(xid, XAResource.TMSUCCESS);
|
| try
| {
| sendingSession.prepare(xid);
| fail("Exception was expected");
| }
| catch (Exception e)
| {
| e.printStackTrace();
| }
|
|
I would expect the following test to also fail:
| prod = sendingSession.createProducer(addressA);
|
| securityManager.removeRole("auser", "guest"); // removing send privileges
|
| prod.send(createTextMessage(sendingSession, "Test", true)); // Async, ok.. I can accept not having a failure here.
| prod.send(createTextMessage(sendingSession, "Test", true)); // Async.. I can accept not having a failure here.
| try
| {
| sendingSession.close(); // The consumer had failures on Async operations.. should't close throw an exception?
| fail("Expected exception");
| }
| catch (MessagingException e)
| {
| e.printStackTrace();
| // I would expect the close to fail, since there were failures registered
| }
|
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4222149#4222149
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4222149
15 years, 9 months
[Design of JBoss Remoting, Unified Invokers] - Re: Server side thread leak?
by rachmato@redhat.com
I've done another run of the testsuite with smaller pool sizes JRA and Remoting and thread reaping turned on for Remoting. I've attached some comments and a new report file to the original JIRA issue (sorry for the back and forth).
The reduced pool sizes did not affect the passing/failing of tests as far as I can tell, and yet reduced the threading resources considerably - active thread count down by about 1/3. I've gone through and added the (+) as before and confirmed that WorkerThreads and WorkManager threads are being reclaimed.
This sort of change alleviates the (original) problem I was having running the testsuite on HPUX where I was getting OOME: cannot allocate native thread due to no memory left for allocating thread stacks. In that case, the problem was also related to a very high -Xmx setting which left less memory available outside the JVM for allocating thread stacks. Lowering the -Xmx value on the 'all' configuration from 512m to 384m (which is closer to the AS 4.2/4.3 value of 256m) allowed more threads to be created and virtually eliminated the problem.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4222136#4222136
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4222136
15 years, 9 months