dependency.setType("car");
dependencies.getDependency().add(dependency);
environment.setDependencies(dependencies);
connector.setEnvironment(environment);
Resourceadapter resourceadapter = connectorFactory.createResourceadapter();
ResourceadapterInstance resourceadapterInstance = connectorFactory.createResourceadapterInstance();
resourceadapterInstance.setResourceadapterName("resource-connector-resourceadapter-name");
GbeanLocator gbeanLocator = namingFactory.createGbeanLocator();
gbeanLocator.setGbeanLink("connector-resourceadapter-workmanager-gbeanlink");
namingPattern = namingFactory.createPattern();
namingPattern.setArtifactId("connector-resourceadapter-workmanager-pattern-artifactid");
namingPattern.setGroupId("connector-resourceadapter-workmanager-pattern-groupid");
namingPattern.setModule("connector-resourceadapter-workmanager-pattern-module");
namingPattern.setName("connector-resourceadapter-workmanager-pattern-name");
namingPattern.setVersion("connector-resourceadapter-workmanager-pattern-version");
gbeanLocator.setPattern(namingPattern);
resourceadapterInstance.setWorkmanager(gbeanLocator);
configPropertySetting = connectorFactory.createConfigPropertySetting();
configPropertySetting.setName("resource-connector-resourceadapter-instance-name");
configPropertySetting.setValue("resource-connector-resourceadapter-instance-value");
resourceadapterInstance.getConfigPropertySetting().add(configPropertySetting);
resourceadapter.setResourceadapterInstance(resourceadapterInstance);
OutboundResourceadapter outboundResourceadapter = connectorFactory.createOutboundResourceadapter();
ConnectionDefinition connectionDefinition = connectorFactory.createConnectionDefinition();
connectionDefinition.setConnectionfactoryInterface("resource-connector-resourceadapter-outbound-connectiondefinition-interface");
ConnectiondefinitionInstance connectionDefinitionInstance = connectorFactory.createConnectiondefinitionInstance();