Announcement

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

    Question about variables in server.properties

    I have the following section in my server.properties for Real-Time Messaging

    Code:
    # -------------- REAL TIME MESSAGING SETTINGS --------------
    
    # how often do we send keepalives to the client (ms) 
    messaging.keepaliveInterval: 3000 
    
    # how long the client waits after the keepaliveInterval before re-establishing 
    # the connection (ms) 
    messaging.keepaliveReestablishDelay: 1000 
    
    # how long the client waits for the connect handshake to complete before 
    # retrying 
    messaging.connectTimeout: 4000 
    
    # connection time to live - the maximum amount of time a persistent connection 
    # is allowed to stay open before being re-established (ms) 
    messaging.connectionTTL: 120000 
    
    # total response size to pad out to in order to defeat intervening 
    # bufferring by proxies (bytes) 
    messaging.flushBufferSize: 8096 
    
    # dispatcher to use for user registration/message queueing 
    # com.isomorphic.messaging.LocalMessageDispatcher for simple one-jvm messaging 
    # com.isomorphic.messaging.JMSMessageDispatcher for JMS-backed messaging
    # Isomorphic recommends developing using a single container with the 
    # LocalMessageDispatcher and then switching to the JMSMessageDispatcher for production.
    messaging.dispatcherImplementer: com.isomorphic.messaging.JMSMessageDispatcher 
    
    # jms configuration - for JMSMessageDispatcher only 
    messaging.jms.context: _container_ 
    messaging.jms.jndiPrefix: jms 
    messaging.jms.topicConnectionFactory: fooBarConnectionFactory
    Where "fooBarConnectionFactory" is defined in Tomcat:

    Code:
    <Resource auth="Container"
    	name="jms/fooBarConnectionFactory"
    	type="org.apache.activemq.ActiveMQConnectionFactory"
    	description="JMS Connection Factory"
    	factory="org.apache.activemq.jndi.JNDIReferenceFactory"
    	brokerURL="tcp://localhost:41616"
    	brokerName="ActiveMQBroker"
    />
    Is it possible to replace the string "fooBarConnectionFactory" in server.properties with a Spring variable defined elsewhere in my project? For example something like ${my-connection-factory} which maps to fooBarConnectionFactory.

    (My instinct tells me the answer is no, because I know that server.properties is a proprietary SmartGWT properties file and it has no way of knowing about any properties I've defined elsewhere in my project.)

    #2
    No, Spring doesn't get involved in interpretation of server.properties.

    We're not sure what the point is here, however. Are you trying to have the application use different names for the TopicConnectionFactory in different environments?

    Comment


      #3
      Note that you do have the opportunity to modify the properties that the framework uses at runtime via Config.setPut(). So that's an easy way to make the configuration depend on some information you're extracting from Spring.

      Comment

      Working...
      X