I suppose you really mean you want to create Queues or Topics?
You probably need to pass a different name for your queue/topic, in the list of properties, when doing:
createModule("my-queue", "jms-queue", properties);
Maybe take a look at this testcase that shows how the API is used to create datasources:
I want to create dynamically the Queues and the MDBs. I don't have problems creating queues.
A clarification: I can succefully create one MDB, The problem occurs when creating the second (i get the InstanceAlreadyExistsException).
Thanks for the testcase, i take a look.