[Spring Integration] New message: "Re: @Autowiring of beans from Spring applicationcontext"
by J H
User development,
A new message was posted in the thread "@Autowiring of beans from Spring applicationcontext":
http://community.jboss.org/message/522299#522299
Author : J H
Profile : http://community.jboss.org/people/joboss
Message:
--------------------------------------------------------------
Hey Marius,
first of all: thanks for the quick reply. I will try to give you as much information as I can do and provide a small example project, that will reflect the .ear structure. They are all maven and eclipse projects, so it should be easy to reproduce. You will find them in the attached file.
A summary of what infrastructure I use:
Server: JBoss 5.1.0GA
OS: Windows 7
WS-Module: jbossws-metro-3.2.2.GA
The only modifications I did in the run.conf is, that I changed the memory settings of the JVM. The rest is standard JBoss settings.
For packaging the .ear I use the skinny-war settings in the pom, put all the .jars in the /lib dir and as far as I can see there's no duplicate spring jars. Also in the jboss dirs I could NOT find any spring jar.
I created three example projects comprising a .war, .jar and an .ear. The .ear can be deployed and installs a WebService.
The WebService is listed in the host:port/jbossws site and can be reached under host:port/autowiring_war/AutowiringWebService?wsdl
A logfile is also attached. Concerning this everything seems to work fine.
Thanks for your help ....
johannes
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/522299#522299
16 years, 2 months
[JBoss AOP Development] New message: "Re: ClassPool Refactoring"
by Flavia Rainone
User development,
A new message was posted in the thread "ClassPool Refactoring":
http://community.jboss.org/message/522295#522295
Author : Flavia Rainone
Profile : http://community.jboss.org/people/flavia.rainone@jboss.com
Message:
--------------------------------------------------------------
A quick update on this: for some reason, the behavior of ClassPool.get method is no longer consistent with ScopedClassPool.getLocally method.
The first time AOP asks for a class, during transformation, it knows that the class should be generated by the exact same classpool that corresponds to the classloader that loaded the class, so it uses getLocally.
The second time AOP asks for the class is during the same transformation (these are actually indirect calls made from inside javassist, during call weaving, for example), the class is retrieved through get. Currently, the classpool delegates the retrieval of the class to the default domain, and the default domain returns a different class.
I think that clearly every call to get should check first whether the class is already in the local classes cache. Adding such a check fixed most of the failing tests in AS trunk (only two failures left), but broke the cache tests of Kabir's implementation.
So, I have a few questions regarding this:
- why is it that calling get on the default domain returns a different version of the same class? This needs further investigation because it is clearly a bug
- why wasn't the classes cache being used by BaseClassPool.get before? Any reason for this? This has been copied from previous versions, I think that it definetly causes some overhead (the above should work, but it would be faster if the classpool finds out it has already created the class and returns the same class instead of delegating to the domain first).
- if the cache starts being used as a first step of BaseClassPool.get, as it is in my local fix (not committed yet), is there need for a second level cache as Kabir wrote?
My next steps will be:
- investigate the next couple of AOP tests that are failing
- investigate the majority of scoped AOP tests that are failing
- investigate why is it that the default domain pool is returning a class that it shouldn't return at all
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/522295#522295
16 years, 2 months
Presenting certificate chain with subsidiary CA certificate
by Brian Candler
I have a problem getting Jboss to present a chain of certificates to a
client.
The situation is this: the server has a certificate signed by an
intermediate (subsidiary) CA, and the subsidiary CA has a certificate signed
by a root CA.
I have installed all three certificates into the keystore using keytool
(keytool -list shows them):
- the server certificate
- the intermediate certificate
- the root certificate
each with a different alias. However, when an TLS client connects, only the
server certificate is presented to the client. This can be demonstrated
using
openssl s_client -connect x.x.x.x:443
Since the client has only the root certificate, it cannot verify the server
certificate.
Now, the server should be presenting the intermediate certificate as well. I
can make this work in Tomcat behind Apache (you can either concatenate
multiple PEM files together, or use the SSLCertificateChainFile directive),
but I can't see what to do with Jboss.
This is Jboss 4.3.2ga, and here's the relevant bit of server.xml:
<!-- Define a SSL HTTP/1.1 Connector on port 443 -->
<Connector port="443" protocol="HTTP/1.1" SSLEnabled="true"
maxThreads="150" scheme="https" strategy="ms" secure="true"
SSLEngine="on"
clientAuth="false" sslProtocol="TLS"
SSLCertificateFile="${jboss.server.home.dir}/conf/server-cert.pem"
SSLCertificateKeyFile="${jboss.server.home.dir}/conf/server-key.pem"
SSLCACertificateFile="${jboss.server.home.dir}/conf/ca-chain.pem"
keystoreFile="${jboss.server.home.dir}/conf/server.keystore" keystorePass="XXXXXXXX"
truststoreFile="${jboss.server.home.dir}/conf/server.truststore" truststorePass="YYYYYYYY"
/>
I'm not actually sure if the SSLCertificateFile/KeyFile/CACertificateFile do
anything, but they're in a configuration I inherited. Certainly the
keystoreFile directive is active, because if I give the wrong keystorePass
then I'm told that the keystore file is not readable.
I also tried putting the certificates into server.truststore, but this
doesn't seem to make a difference.
Any help much appreciated.
Thanks,
Brian Candler.
16 years, 2 months
[jBPM] New message: "[jBPM 4.3] Cancel Job/Timer"
by Nils Preusker
User development,
A new message was posted in the thread "[jBPM 4.3] Cancel Job/Timer":
http://community.jboss.org/message/522289#522289
Author : Nils Preusker
Profile : http://community.jboss.org/people/nilspreusker
Message:
--------------------------------------------------------------
Hi,
I'm trying to find a way to cancel or delete jobs or timers to move a process instance into the state "active-root".
Here is a more detailed description what I'm trying to do: I have a state - "wait state" - that contains a transition with a timer, which will execute a java activity - "do something". Now I want to provide an alternative path of execution, in case something goes wrong with the java activity. Since the process instance is in state "inactive scope" (because the job has to be finished before the execution can move on), I'll get an exception when I signal the process instance to move to "another wait state". I suppose, that by deleting or canceling the timer and the associated job, the state of the process instance would be set to "active-root".
I'm aware that the "TimerEventTest" does almost the same thing, using an event listener, but the problem is that I need to invoke an alternative path of execution if something goes wrong during the execution of the java activity.
Consider the following process definition:
http://community.jboss.org/servlet/JiveServlet/showImage/1876/cancel-job.png
=================================
<?xml version="1.0" encoding="UTF-8"?>
<process name="cancel-job" xmlns="http://jbpm.org/4.3/jpdl">
<start g="88,11,48,48" name="start1">
<transition g="-69,-18" name="to wait state" to="wait state"/>
</start>
<state g="65,92,92,52" name="wait state">
<transition g="-93,-18" name="to do something" to="do something">
<timer duedate="20 minutes"/>
</transition>
<transition g="272,118:-114,-18" name="to another wait state" to="another wait state"/>
</state>
<java class="de.nilspreusker.DoSomething" g="58,218,105,52" method="doSomething" name="do something">
<transition name="to end1" to="end1" g="-51,-14"/>
</java>
<state g="206,218,133,52" name="another wait state">
<transition name="to end1" to="end1" g="14,-14"/>
</state>
<end name="end1" g="167,336,48,48"/>
</process>
=================================
... and test case:
=================================
package yourpackage;
import org.jbpm.api.ProcessInstance;
import org.jbpm.test.JbpmTestCase;
public class CancelTest extends JbpmTestCase {
String deploymentId;
protected void setUp() throws Exception {
super.setUp();
deploymentId = repositoryService.createDeployment()
.addResourceFromClasspath("yourpackage/cancel-job.jpdl.xml")
.deploy();
}
protected void tearDown() throws Exception {
repositoryService.deleteDeploymentCascade(deploymentId);
super.tearDown();
}
public void testJavaInstantiate() {
ProcessInstance processInstance = executionService.startProcessInstanceByKey("cancel_job");
String pid = processInstance.getId();
assertTrue(processInstance.isActive("wait state"));
assertTrue(processInstance.getState().equals(ProcessInstance.STATE_INACTIVE_SCOPE));
// This throws: "org.jbpm.api.JbpmException: execution[cancel_job.7] is not active: inactive-scope"
// executionService.signalExecutionById(processInstance.getId(), "another wait state");
}
}
=================================
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/522289#522289
16 years, 2 months