0 Replies Latest reply on Feb 22, 2002 2:15 PM by guy_rouillier

    Platform-specific settings

    guy_rouillier

      I know I've raised this issue before, but it keeps popping up in one form or another, and I have yet to get a satisfactory approach. We keep all our source in CVS, then check it out to are system test platform and build it there. If everything tests okay, we then promote to our production platform. "Promote" for us consists of copying appropriate files from one computer to the other. We don't rebuild when we promote. For things like jboss.jcml, we have subdirectories under conf named after each host, and we use the files under that directory when we promote to a new computer.

      Finally my question. Several of our EJBs have to contact different resources depending on which platform they are running on. If I understand it correctly, the specified way to do this is to make changes in the deployment descriptor. The problem with that is that it requires ripping apart the EJB JAR file, changing the deployment descriptor, and reassembling the JAR. I don't want to be doing that at promote time. Has anyone found a way to have platform specific settings in EJBs that doesn't require disassembling the JAR? Maybe I can have a set of property files like test.props and prod.props, and then load the appropriate set in the EJB based on what platform I'm running on? I could identify the platform with a -D to the JVM.