Question

I want to create a JMSProvider object with a custom classpath. Here's how I'm doing it in jython:

... classpath = "a.jar:b.jar:c.jar".replace(":", "\n") properties = [ ['name', name], ['description', description], ['classpath', classpath], ['externalInitialContextFactory', externalInitialContextFactory], ['externalProviderURL', externalProviderURL], ['nativepath',[]], ['supportsASF','true'] ] AdminConfig.create('JMSProvider', node, properties) AdminConfig.save()

The JMSProvider is created, but the classpath variable has the newlines escaped:

a.jar\nb.jar\nc.jar

How can I tell wsadmin to not escape the newlines?

Was it helpful?

Solution

Whilst the WAS admin console (the web page) requires you to enter the classpath with newlines, the wsadmin tool requires that it be separated by the host O/S file separator. So there is no need to modify the input string at all.

classpath = "a.jar;b.jar;c.jar"

Will work just fine.

OTHER TIPS

"\n" is a real newline.

Compare repr(classpath) immediately after classpath.replace() with the repr(classpath) that JMSProvider sees they should be the same.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top