at the same time or multiple instance?
i don't know how to do it in the same time. but if you want to do the second way, defined type might good enough.
like i wrote a defined type named tomcat, i can pass the different locate it installs to, port that listens to instantiate more than on tomcat app and woks fine.