Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Accessing Custom Properties in the server.properties File

    Our application is using custom operation binding logic to call Java Proxy Objects and initiate request from our existing application backend. As such, we have a connection string that is being used in the operation bindings to tell the application how to connect to our existing code base. We ARE NOT making use of the built-in SQL functionality as we have to support non-SQL databases.

    We would like to store the connection strings in one location, instead of having to define them in each operation binding datasource and/or java class. We are hoping that we can define the connection string in the server.properties file and load it on the server when a user logs in to the application. Is it possible to define custom properties in the server.properties file and if so, how would server sided logic pick up/use that custom property?

    Thanks,

    Jason Erickson

    #2
    Hi jerickson,

    any Java Property file and the standard Java way of accessing it should be fine, shouldn't it?
    So IMHO yes, you could also use server.properties if you want to.

    Best regards
    Blama

    Comment


      #3
      Using our SQL support doesn't make you unable to support non-SQL databases, so you should probably revisit that decision. There are a number of customers building applications that use our SQL support but also store some things to Cassandra, or to external web services, etc.

      You can use the Config class to access anything stored in server.properties, although you could also just use your own properties file, or any other type of file, of course.

      Comment

      Working...
      X