Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The Management Console Security page will give you the instructions that you should use to set this up.

Wiki Markup
{cloak}

Wiki Markup
{toggle-cloak:id=qHowToWriteOwnInVMTests}
How do I use an InVM Broker for my own tests?

Wiki Markup
{cloak:id=qHowToWriteOwnInVMTests}

I would take a look at the testPassiveTTL in TimeToLiveTest

The setUp and tearDown methods show how to correctly start up a broker for InVM testing. If you write your tests using a file for the JNDI you can then very easily swap between running your tests InVM and against a real broker.

See our JNDI How to page on how to confgure it

Basically though you just need to set two System Properites:

java.naming.factory.initial = org.apache.qpid.jndi.PropertiesFileInitialContextFactory
java.naming.provider.url = <your JNDI file>

and call getInitialContext() in your code.

You will of course need to have the broker libraries on your class path for this to run.

Wiki Markup
{cloak}