Dimitri Bouras [https://community.jboss.org/people/dim5b] created the discussion
"Accessing JCA from junit testcase" To view the discussion, visit: https://community.jboss.org/message/760121#760121 -------------------------------------------------------------- I have deployed the HelloWorld example provided by ironjacamar on jboss 7.1. I would like to call it from a junit test is this possible? private static final String INITIAL_CONTEXT_FACTORY = "org.jboss.naming.remote.client.InitialContextFactory"; private static final String PROVIDER_URL = "remote://localhost:4447"; @Test public void testHelloWorldNoArgs() throws Throwable { final Properties env = new Properties(); env.put(Context.INITIAL_CONTEXT_FACTORY, INITIAL_CONTEXT_FACTORY); env.put(Context.PROVIDER_URL, System.getProperty(Context.PROVIDER_URL, PROVIDER_URL)); final InitialContext context = new InitialContext(env); final Object ref = context.lookup("java:/eis/HelloWorld"); System.out.println("echo, ra/DirContextFactory=" + ref); final HelloWorldConnectionFactory dcf = (HelloWorldConnectionFactory) ref; System.out.println("echo, found dcf=" + dcf); final HelloWorldConnection dc = dcf.getConnection(); System.out.println("echo, lookup dc=" + dc); dc.helloWorld("Dimtris"); dc.close(); } I am getting... Remote connection failed: javax.security.sasl.SaslException: Authentication failed: all available authentication mechanisms failed Is there any i call the JCA adapter from a nonmaneged enviroment? thanks in advance -------------------------------------------------------------- Reply to this message by going to Community [https://community.jboss.org/message/760121#760121] Start a new discussion in IronJacamar at Community [https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2098]
_______________________________________________ jboss-user mailing list [email protected] https://lists.jboss.org/mailman/listinfo/jboss-user
