2 Replies Latest reply on Sep 22, 2009 4:26 AM by shogun1234

    Question about -ds.xml file

    shogun1234

      I am new to jboss and currently developed a module which will talk to database through -ds.xml, in which it contains some Sybase specific setting.

      ...
       <connection-url>jdbc:sybase:Tds:${database.svcname}:${database.port}/${database.name}</connection-url>
      
      ...
      
       <metadata>
       <type-mapping>Sybase</type-mapping>
       </metadata>
      
      


      the java side already been fixed to use standard sql, but how can I make ds xml to be portable as well? Or point me to where there contains related document. (I search on the internet, but seems there is no explain on this. Maybe I don't use the right key word. I use type-mapping metadata ds xml , etc. )

      I appreciate any help.

      Thank you.



        • 1. Re: Question about -ds.xml file
          peterj

          What do you mean by "how can I make ds xml to be portable as well? "? Portable how? 1) To a different operating system? 2) To a database other than Sybase? 3) To a different application server?

          1) The one *-ds.xml file works on all OSes.

          2) I suppose you could use system properties for all the settings in *-ds.xml and then set those properties when running the app server. But then you have to maintain those settings for different databases. It is much easier to have a *-ds.xml file per database. Or do what I do - I have a generic *-ds.xml file and generate the final one using Ant, with Ant properties providing the database-specific parts.

          3) Not possible - each app server has its own way of defining datasources.

          • 2. Re: Question about -ds.xml file
            shogun1234

            Second solution is what I am looking for.

            Sorry I did not explain well and thanks for explaning clearly: )


            "PeterJ" wrote:
            What do you mean by "how can I make ds xml to be portable as well? "? Portable how? 1) To a different operating system? 2) To a database other than Sybase? 3) To a different application server?

            1) The one *-ds.xml file works on all OSes.

            2) I suppose you could use system properties for all the settings in *-ds.xml and then set those properties when running the app server. But then you have to maintain those settings for different databases. It is much easier to have a *-ds.xml file per database. Or do what I do - I have a generic *-ds.xml file and generate the final one using Ant, with Ant properties providing the database-specific parts.

            3) Not possible - each app server has its own way of defining datasources.