If you mean an .ear/.jar containing MDBs, you can use deploy(URL)/undeploy(URL) on the MainDeployer MBean.
If you mean how to create message queues/topics that can survive a server restart you can have a go with the new DeploymentService:
dimitris , Thanks for the reply.
i just needed MDB ears to be deployed and undeployed programmatically.
I donot want the topics/queues to be created programmatically.