You could simply use a default spring junit 4 test. I think there the
default is to reuse the spring context.
I have done such a test in SoapCxfServerTest:
http://svn.apache.org/repos/asf/camel/trunk/components/camel-soap/src/test/java/org/apache/camel/dataformat/soap/SoapCxfServerTest.java
Greetings
Christian
Am 06.07.2010 17:55, schrieb Christian Müller:
Hello Christian, hello Willem!
I extract the creation of the client in a 'setUpBeforeClass' method, so that
the client is only initialized once:
@BeforeClass
public static void setUpBeforeClass() throws Exception {
URL wsdlURL =
IncommingRouteTest.class.getClassLoader().getResource("META-INF/wlsi/person-non-wrapper.wsdl");
PersonService ss = new PersonService(wsdlURL, new QName("
http://camel.apache.org/non-wrapper", "PersonService"));
client = ss.getSoap();
}
But I still have the same behavior (because of the reason Willem mentioned).
My knowledge is, that the Camel JUnit helper classes always create a new
camel context after each test. This means for my test, I can not use the
Camel JUnit helper classes?
Regards,
Christian
--
----
http://www.liquid-reality.de