• Welcome to KonaKart Community Forum. Please login or sign up.
 

How to update translations in client-app

Started by rula, June 02, 2008, 06:35:30 am

Previous topic - Next topic

rula

Hello,

how can I reach a simple update of the the messages-catalog in the client-app?
Only if I stop and start the server, the message-resources are updated.
I think a simple reload is enough, but I can't find a way to reach this.

In admin-app there is no problem, I do the changes and klick only F5 in the browser and the all seems to be okay.

regards, rula

ryan

Hi,

The application uses the Struts message resource file which is loaded into memory when the Action servlet is initialized. Rather than starting and stopping the server, just reloading the application should work. If you do a search on the web you will find that many people have worked around this problem by making some struts customizations (e.g. http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=58&t=007061 ).

rula

Hi,

i found many different solutions in the java-ranch-threat.

The last entry by Michael Böckling is my private favourite.

two utility-classes:
- ReloadablePropertyMessageResources.java
- ReloadablePropertyMessageResourcesFactory.java
and one change in struts-config.xml:
<message-resources parameter/>

Have anybody here proved this way?

regards, rula

rula

Hi,

i need the reload of message-resources prior for configuration and performance is not so important.
So, i think i should solve this problem in tomcat with the reloadable-attribute of the context-element.

like here in the tomcat-doc:

Set to true if you want Catalina to monitor classes in /WEB-INF/classes/ and /WEB-INF/lib for changes, and automatically reload the web application if a change is detected. This feature is very useful during application development, but it requires significant runtime overhead and is not recommended for use on deployed production applications. That's why the default setting for this attribute is false. You can use the Manager web application, however, to trigger reloads of deployed applications on demand.

First i test to use the tomcat-manager-app!

regards, rula

rula

Hi,

in server.xml i use this:
        <Context path="/konakart"
                 reloadable="false"
                 docBase="C:\Programme\konakart2.2.4\webapps\konakart"/>

by the reload occurs the exception below:

'Has no functional impact', but where is the problem.

It works for me, the message-resources are refreshed.

Could not load java.net.BindException ???

regards, rula

INFO: Reloading this Context has started
02.06.2008 11:10:58 org.apache.catalina.loader.WebappClassLoader loadClass
INFO: Illegal access: this web application instance has been stopped already.  Could not load java.net.BindException.  The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
java.lang.IllegalStateException
   at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1238)
   at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
   at java.lang.ClassLoader.loadClassInternal(Unknown Source)
   at com.mysql.jdbc.SQLError.createLinkFailureMessageBasedOnHeuristics(SQLError.java:1220)
   at com.mysql.jdbc.CommunicationsException.<init>(CommunicationsException.java:51)
   at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1070)
   at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3246)
   at com.mysql.jdbc.MysqlIO.quit(MysqlIO.java:1656)
   at com.mysql.jdbc.ConnectionImpl.realClose(ConnectionImpl.java:4261)
   at com.mysql.jdbc.ConnectionImpl.cleanup(ConnectionImpl.java:1248)
   at com.mysql.jdbc.ConnectionImpl.finalize(ConnectionImpl.java:2655)
   at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
   at java.lang.ref.Finalizer.runFinalizer(Unknown Source)
   at java.lang.ref.Finalizer.access$100(Unknown Source)
   at java.lang.ref.Finalizer$FinalizerThread.run(Unknown Source)
KonaKartPlugin : propertiesPath = konakart.properties
02-Jun 11:11:00 INFO  (?:init:?) Finished Initialising Log4j
02-Jun 11:11:00 INFO  (?:init:?) Initialising Torque with the file : /C:/Programme/konakart2.2.4/webapps/konakart/WEB-INF/classes/konakart.properties
02-Jun 11:11:01 INFO  (?:init:?) Initialising KonaKart-Torque for org.apache.torque.adapter.DBMM
02-Jun 11:11:01 INFO  (?:init:?) Finished Initialising Torque
02-Jun 11:11:01 INFO  (?:init:?) Initialising konakart with the file : konakart.properties
02-Jun 11:11:01 INFO  (?:initKonakart:?) KonaKart V2.2.4.0 built 11:00AM 18-Mar-2008 GMT
02-Jun 11:11:01 INFO  (?:init:?) Finished Initialising konakart
KKAppEngPlugin : propertiesPath = konakart_app.properties
02-Jun 11:11:01 INFO  (?:readPropertiesFile:?) kkAppEng using configuration file: /C:/Programme/konakart2.2.4/webapps/konakart/WEB-INF/classes/konakart_app.properties
02-Jun 11:11:01 INFO  (?:<init>:?) Engine used by application is com.konakart.app.KKEng
02-Jun 11:11:02 INFO  (?:<init>:?) KKGWTService ready and waiting....
02-Jun 11:11:02 INFO  (?:<init>:?) Engine used by application is com.konakart.app.KKEng
02.06.2008 11:11:06 org.apache.catalina.core.ApplicationContext log
INFO: HTMLManager: list: Listing contexts for virtual host 'localhost'