: How it works
just a short wrap up of how JMS Load Tester works
- Java > 1.5, purely based on Java interfaces, provider specific implementations are not bundled, they have to be provided by you (in form of “jar” files)
- all lookup and retrieving is done via JNDI (Factories, Queues, Topics)
- the application creates a Thread for each listener and sender (as configured in the app.properties)
- two central pieces keep track of everything created (ThreadTracker) and messages sent&received (MessageTracker)
- each Thread gets its own javax.jms.Session instance (via ThreadLocal)
- one javax.jms.Connection is reused and shared
- the javax.naming.Context is reused and shared
- the javax.jms.Destination instances are cached
- the javax.jms.MessageProducer instances are cached (per Thread)
- the application uses Runtime.getRuntime().addShutdownHook to register certain components for cleanup
- currently supports javax.jms.BytesMessage and javax.jms.TextMessage
- messages loaded from the file system are cached once they are loaded the first time
- message loaded from the file system are stored as byte array until they are actually send
- the timer works based on System.nanoTime()
- different acknowledgement modes are supported when creating the sender sessions
can this be done better? i am sure it can. as i am neither a JMS nor a Threading expert there are loads of things that could be improved i guess. why not give some suggestions after you have tried the tool?