if (destinationLookup == null && destinationProp == null) {
String appName = descriptor_.getApplication().getAppName();
String moduleName = ConnectorsUtil.getModuleName(descriptor_);
JMSDestinationDefinitionDescriptor destination = getJMSDestinationFromDescriptor(jndiName, descriptor_);
String destName = null;
if (isValidDestination(destination)) {
destName = destination.getDestinationName();
} else {
destName = getPhysicalDestinationFromConfiguration(jndiName, appName, moduleName);
}
//1.3 jndi-name ==> 1.4 setDestination
descriptor_.putRuntimeActivationConfigProperty(
new EnvironmentProperty(DESTINATION,
destName, null));
//1.3 (standard) destination-type == 1.4 setDestinationType
//XXX Do we really need this???
if (descriptor_.getDestinationType() != null &&
!"".equals(descriptor_.getDestinationType())) {
descriptor_.putRuntimeActivationConfigProperty(
new EnvironmentProperty(DESTINATION_TYPE,
descriptor_.getDestinationType(), null));
if (_logger.isLoggable(Level.INFO)) {
_logger.log(Level.INFO, "endpoint.determine.destinationtype", new
Object[]{descriptor_.getDestinationType(), jndiName, descriptor_.getName()});
}
} else if (isValidDestination(destination) &&
ConnectorConstants.DEFAULT_JMS_ADAPTER.equals(destination.getResourceAdapter())) {
descriptor_.putRuntimeActivationConfigProperty(
new EnvironmentProperty(DESTINATION_TYPE,
destination.getInterfaceName(), null));
if (_logger.isLoggable(Level.INFO)) {
_logger.log(Level.INFO, "endpoint.determine.destinationtype", new
Object[]{destination.getInterfaceName(), destination.getName(), descriptor_.getName()});
}
} else {
/*
* If destination type is not provided by the MDB component
* [typically used by EJB3.0 styled MDBs which create MDBs without