/** * This method opens a connection and the interaction. * * @return True if successful, false if not. */ public void createConnectionInteraction() { if (this.connectionFactory == null) { TransactionHelper.logAndThrowDataException( callingFunctionName, "Failure looking up a connection factory for resource name: " + resourceName, null); } try { /* * Get a connection from the connection factory. Requires that * setupConnectionFactory was called successfully beforehand. */ connection = connectionFactory.getConnection(); /* * Create an interaction object to make a call to an SAP system * where you can send your business data and receive data back: */ interaction = connection.createInteraction(); } catch (Throwable e) { TransactionHelper.logAndThrowDataException( callingFunctionName, "Failure getting connection for resource name: " + resourceName, e); } }