1 Reply Latest reply on Aug 19, 2002 10:21 AM by Gabriel

    Creating DataSources + JavaMail sessions dynamically

    Kyle Downey Newbie

      The 3.0 book contains information on how to create JMS Topics and Queues through an MBean interface, and how to undeploy/deploy services. I got the deployer working through the RMI adaptor without too much trouble, but I'm stumped trying to automate setting up new datasources and mail services. I think I can hack it by passing the XML file describing the mail or database service to the Deployer's deploy(URL) method, but that requires writing a temporary file with the settings I want. Kind of ugly. Is there a better way.

      Simply put, what I want to do is be able to dynamically create the referenced resources an EAR, JAR or WAR needs via JMX. That way I can set things up, deploy it programmatically, run unit tests on it, and then undeploy, all without human intervention. I think that would be a useful JUnit extension.

      Any good references or suggestions?

      --kd