@Override public void start(BundleContext context) throws Exception { if ("true".equalsIgnoreCase(context.getProperty("org.jpos.q2.autostart"))) (q2 = new Q2(new String[] {}, context)).start(); }
public static void main (String[] args) throws Exception { Q2 q2 = new Q2(args); q2.setExit (true); q2.start(); } public static String getVersion() {
registerOSGIBundle(f); for (ObjectInstance instance : startList) start(instance);
public void setUp () throws Exception { sp = SpaceFactory.getSpace("tspace:txnmgrtest"); q2 = new Q2("build/resources/test/org/jpos/transaction"); q2.start(); } // public void testSimpleTransaction() {
@Before public void setUp() throws Exception { sp = SpaceFactory.getSpace(); q2 = new Q2("build/resources/test/org/jpos/q2/iso"); expiredCalled = false; q2.start(); Thread.sleep(2000L); try { mux = (MUX) NameRegistrar.get("mux.mux"); } catch (NameRegistrar.NotFoundException e) { fail("MUX not found"); } receivedHandback = null; }
@Test public void testRetry() throws IOException { Q2 q2 = new Q2("build/resources/test/org/jpos/util/dirpoll_retry/deploy"); q2.start(); ISOUtil.sleep(5000L); createTestFile("build/resources/test/org/jpos/util/dirpoll_retry/request/REQ1", "RETRYME"); ISOUtil.sleep(5000L); q2.stop(); ISOUtil.sleep(2000L); assertTrue("Can't read request", new File("build/resources/test/org/jpos/util/dirpoll_retry/request/REQ1").canRead()); } public static class RetryTest implements DirPoll.Processor {
@BeforeClass public static void setUp() throws NameRegistrar.NotFoundException { if (q2 == null) { q2 = new Q2(); q2.start(); NameRegistrar.get("qrest", 60000L); NameRegistrar.get("qrest"); // this time throw exception mgr = NameRegistrar.get("http-client-txnmgr", 10000L); } }
@BeforeClass public static void setUp() { RestAssured.baseURI = APITest.BASE_URL; RestAssured.requestSpecification = new RequestSpecBuilder().build().contentType(MediaType.APPLICATION_JSON); sp = SpaceFactory.getSpace(); if (sp.rdp ("JPOSEE:STARTED") == null) { System.setProperty("user.name", "admin"); q2 = new Q2(); q2.start(); } ISOUtil.sleep(5000); }
@BeforeClass public static void setUp() throws NameRegistrar.NotFoundException { RestAssured.baseURI = BASE_URL; RestAssured.useRelaxedHTTPSValidation(); RestAssured.requestSpecification = new RequestSpecBuilder().build().contentType(APPLICATION_JSON.toString()); if (q2 == null) { q2 = new Q2(); q2.start(); NameRegistrar.get("qrest", 60000L); NameRegistrar.get("qrest"); // this time throw exception } }