scala - GlassFish 3.1.2 + Cluster + Web Container Properties -
I have an issue in a glassfish in which we are working with the properties for establishing a web application. A package is moving forward from using in the environment Setting up with the glassfish on Amazon AWS
Traditionally speaking while dealing with the Servlets you tend to use a .properties file when you Want to parse the environment variable, l Do what you use distributed environment will keep the .properties file in each cluster node). Glassfish has the ability to configure the properties of the web container through their admin console, which means that the properties will be automatically delivered through the cluster
The problem is, I want to retrieve the variable I am about to behave randomly. The first time I ran a test application, I could not retrieve the variable, though it does not work anymore
Actually I'm setting environment variables through the admin UI. Under the configuration, 3 configuration statches are for a cluster (usually named config), a default-config, and a server-config. Under the web container I have put a test property in all 3 of the "some wall" names.
I then created a quick skeletal app in Scala (which uses serchate 2.5) and I use
getServletContext.getInitParameter (" SomeVal ") Any ideas that I'm doing wrong, it always gives blank?
Update It appears that what I was trying to do is not the "right" way to talk, so my question is, while working with the cluster in the glassfish The standard way of providing specific application settings (outside and outside the runway). Myfear said that using the database is a standard approach, although I use these configuration settings to define myself as a JDBC connection. "post-text" itemprop = "text"> I got you mentioning the web container settings
I am afraid that it has never been thought of providing a specific specific configuration and I strongly believe that you can get the servlet reference To those qualities Will never be able to climb. Therefore, if you are talking about application specific information, then you can use the servlet init parameter in web.xml. If you
getServletContext () SetInitParameter ("Ultimate", "Price"); You may be able to set them up (at least for the application's runtime). I am not sure about the cluster replication here in the normal manner you can get configuration settings in the database.
Comments
Post a Comment