" <parameter name=\"className\" value=\"org.apache.axis.utils.Admin\"/>\n" +
" </service>\n" +
"</deployment>";
public static void main(String args[]) throws Exception {
Options opts = new Options( args );
// first check if we should print usage
if ((opts.isFlagSet('?') > 0) || (opts.isFlagSet('h') > 0)) {
printUsage();
}
// create the jms listener
SimpleJMSListener listener = new SimpleJMSListener(opts);
listener.start();
args = opts.getRemainingArgs();
if ( args == null ) {
printUsage();
}
int numArgs = args.length;
String[] symbols = new String[numArgs];
for (int i = 0; i < numArgs; i++) {
symbols[i] = args[i];
}
Service service = new Service(new XMLStringProvider(wsdd));
HashMap cfProps = new HashMap();
cfProps.put(SonicConstants.BROKER_URL, opts.isValueSet('b'));
cfProps.put(SonicConstants.DEFAULT_USERNAME, opts.getUser());
cfProps.put(SonicConstants.DEFAULT_PASSWORD, opts.getPassword());
// do we have a jndi name?
String jndiName = opts.isValueSet('n');
if (jndiName != null) {
// w/ a jndi name, we can get the appropriate connection factory
cfProps.put(JMSConstants.CONNECTION_FACTORY_JNDI_NAME, jndiName);
} else {
// w/o a jndi name, we default to using the Sonic-specific method
// for creating a connection factory, which is by specifying the
// appropriate connection factory class from SonicConstants.java
// topics or queues?
String cf = null;
if (opts.isFlagSet('t') > 0) {
cf = SonicConstants.TCF_CLASS;
} else {
cf = SonicConstants.QCF_CLASS;
}
cfProps.put(JMSConstants.CONNECTION_FACTORY_CLASS, cf);