« Return to Thread: Automated queue creation within a swiftlet
- as I said above, this is what I am now trying to do, however I am getting some sporadic errors like:IIT Software wrote:if you determine the queue name programmatically, you will do it with API-calls directly in your Swiftlet's startup method
2009-07-05 21:18:44,130 [main] ERROR - Error creating new queue com.swiftmq.tools.requestreply.TimeoutException: Request timeout occured (60000) ms at com.swiftmq.admin.mgmt.EndpointFactory$EndpointCreator.request(Unknown Source) at com.swiftmq.admin.mgmt.EndpointFactory$EndpointCreator.create(Unknown Source) at com.swiftmq.admin.mgmt.EndpointFactory.createEndpoint(Unknown Source) at com.swiftmq.admin.cli.CLI.createEndpoint(Unknown Source) at com.swiftmq.admin.cli.CLI.init(Unknown Source) at com.swiftmq.admin.cli.CLI.I cannot work out how to reliably repeat these errors, but it does make me a little worried. Are there potentially any timing issues with creating CLI connections during the startup of a Swiftlet? In the timeout above, I notice that my cli.bat connections to the same router only say "Router 'myrouter' is available for administration" after the above call has timed out. How do you suggest I debug this further? Secondly, what's the best way to internally (Swiftlet API) obtain the correct provider URL to obtain a queue connection to use with the CLI? I'm currently using the below, but given I'm inside a Swiftlet, surely there's a better way to obtain the listener port at least? Or should I just use an intravm connection factory instead? I'm not sure from the documentation whether it's intended for this purpose.(Unknown Source) at MySwiftlet.verifyQueueExists(MySwiftlet.java:690) ... at MySwiftlet.startup(MySwiftlet.java:97) at com.swiftmq.swiftlet.SwiftletManager.startUpSwiftlet(Unknown Source) at com.swiftmq.swiftlet.SwiftletManager.loadExtensionSwiftlet(Unknown Source) at com.swiftmq.swiftlet.SwiftletDeployer.start(Unknown Source) at com.swiftmq.swiftlet.SwiftletDeployer$4.swiftletStarted(Unknown Source) at com.swiftmq.swiftlet.SwiftletManager.fireSwiftletManagerEvent(Unknown Source) at com.swiftmq.swiftlet.SwiftletManager.startUpSwiftlet(Unknown Source) at com.swiftmq.swiftlet.SwiftletManager.startKernelSwiftlet(Unknown Source) at com.swiftmq.swiftlet.SwiftletManager.startKernelSwiftlets(Unknown Source) at com.swiftmq.swiftlet.SwiftletManager.initSwiftlets(Unknown Source) at com.swiftmq.swiftlet.SwiftletManager.startRouter(Unknown Source) at com.swiftmq.Router.main(Unknown Source)
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,"com.swiftmq.jndi.InitialContextFactoryImpl");
env.put(Context.PROVIDER_URL,"smqp://localhost:4207/timeout=10000");
InitialContext ctx = new InitialContext(env);
QueueConnectionFactory connectionFactory = (QueueConnectionFactory)ctx.lookup("QueueConnectionFactory");
connection = connectionFactory.createQueueConnection();
ctx.close();
CLI cli = new CLI(connection);
« Return to Thread: Automated queue creation within a swiftlet
| Free embeddable forum powered by Nabble | Forum Help |