- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {Connection c =
DataSource dataSource;dataSource.getConnection()
String url;DriverManager.getConnection(url)
IdentityDatabaseUtil.getDBConnection()
- Smart code suggestions by Codota
}
@Override public org.kie.remote.client.api.RemoteJmsRuntimeEngineFactory buildFactory() throws InsufficientInfoToBuildException { checkAndFinalizeConfig(); // return new instance return new RemoteJmsRuntimeEngineFactory(config.clone()); }
/** * In the 6.0.x code, we did this: * * // Setup remote JMS runtime engine factory * RemoteJmsRuntimeEngineFactory remoteJmsFactory * = new RemoteJmsRuntimeEngineFactory(deploymentId, serverUrl, user, password); * * // Create runtime engine * RuntimeEngine engine = remoteJmsFactory.newRuntimeEngine(); */ public void createJmsRuntimeEngine(String deploymentId, URL serverUrl, String user, String password) { // Now we just do this: RuntimeEngine engine = RemoteRuntimeEngineFactory.newJmsBuilder() .addDeploymentId(deploymentId) .addJbossServerHostName(serverUrl.getHost()) .addUserName(user) .addPassword(password) .build(); // If you still want to use the factory to create multiple instances, you can always still do this: RemoteJmsRuntimeEngineFactory jmsRuntimeFactory = RemoteRuntimeEngineFactory.newJmsBuilder() .addDeploymentId(deploymentId) .addJbossServerHostName(serverUrl.getHost()) .addUserName(user) .addPassword(password) .buildFactory(); engine = jmsRuntimeFactory.newRuntimeEngine(); }
.buildFactory(); jmsRuntimeFactory.newRuntimeEngine().getKieSession(); fail( "A ksession queue is required for a ksession!"); } catch( MissingRequiredInfoException e) { .buildFactory(); jmsRuntimeFactory.newRuntimeEngine().getTaskService(); fail( "A task service queue is always required!"); } catch( MissingRequiredInfoException e) {