Everything Java Apache Geospatial Open Source. Hello Shinning Stars!!! Vincent Massol, Raphael Luta, Santiago Gala, Carsten Z.

Thursday, January 29, 2004

The Name of this project is Merging the power of Google with the power of GIS
TODO - Two versions of Messages.getString are needed one which takes a String property and returns the value and another which takes a String property and a String[] arguments and returns a value with custom properties.
Keep these patterns in mind when creating web applications. Security, Tab pane taglib, Security taglibs, Internationalization, Session management, Handling dates, Web service daemons, Web context listeners, Menu taglibs or Struts menu, Reporting, GIS web service, Struts action delegates, Performance, Multiple VMs Tomcats, Load balancing, Distributed computing machines, Race conditions, URL rewriting, Cookie management.
Problem : Updating a database schema.

Solution : Generate automatically DAOs. Design schema with Clay.

Wednesday, January 21, 2004

AndoMDA looks wonderful.
Added intelligent debugging and a mechanism which prevents the shutdown of the web service daemon during processing.

Tuesday, January 20, 2004

Skeleton class created for the WebServiceDaemon in package com.acadomia.sea.webservice.daemon. This class implements Runnable.

A daemon thread is started using a <web-app> <listener> called com.acadomia.sea.webapp.context.LifeCycleServletContextListener. The contextInitialized method creates the thread and the contextDestroyed method interrupts the thread.

The run method catches an InterruptedException and terminating the thread.

A property (webservice.client.request.period) can be configured in application.properties to tell the daemon at what interval to invoke itself. This property is an integer and represents the number of seconds between daemon processing.

A CustomServlet has been created to delegate super.init and super.destroy. This class provides custom access to events triggered upon initialization and destruction of a servlet.

Log4j has been configured to accept a different log level for org.apache.*, org.apache.struts.*, and com.acadomia.* classes.

<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
<appender class="org.apache.log4j.ConsoleAppender" name="X">
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%p %t %d{yyyy:MM:dd:hh:mm:ss} %c %M line %L %m%n"/>
<logger additivity="false" name="com.acadomia">
<level value="DEBUG"/>
<appender-ref ref="X"/>
<logger additivity="false" name="org.apache.struts">
<level value="INFO"/>
<appender-ref ref="X"/>
<logger additivity="false" name="org.apache">
<level value="INFO"/>
<appender-ref ref="X"/>
<priority value="WARN"/>
<appender-ref ref="X"/>

The build script is now creating a jar by the target dist.

web.xml includes a the tag <listener> which starts and stops the web service daemon.

I've got a problem with java threads in tomcat 4.1.27. The requirement is to start a thread which is a daemon for each tomcat server running in parallel. Here are some key words used to do the research. ServletContextListener contextInitialized

See Enterprise Java Technologies Tech Tips which says that the Servlet Life cycle listener are notified upon "Creation, modification, or removal of a servlet context or session". The mention of session and context attributes was also included.

The solution to this problem invloves a LifeCycleServletContextListener which is declared in your web.xml.

public  color="#000080">class LifeCycleServletContextListener
color="#000080">implements ServletContextListener {

color="#000080">private color="#000080">static color="#000080">final Log log = LogFactory.getLog(LifeCycleServletContextListener. color="#000080">class);

color="#000080">private color="#000080">static Thread t;

color="#000080">public color="#000080">void contextInitialized(ServletContextEvent sce) {
color="#0000ff">"Starting web service daemon..." color="#000000">);
WebServiceDaemon wsd =
color="#000080">new WebServiceDaemon();
t =
color="#000080">new Thread(wsd);
color="#0000ff">"Web service daemon started." color="#000000">);

public color="#000000"> void color="#000000"> contextDestroyed(ServletContextEvent sce) {
color="#0000ff">"Stopping web service daemon..." color="#000000">);
color="#0000ff">"Web service daemon stopped." color="#000000">);

Monday, January 19, 2004

These are the VM arguments that I am using to debug Geronimo in Eclipse

-Dgeronimo.home=file:target/geronimo-DEV/. -Dclient.host=localhost -Dmx4j.log.priority=trace
To know Open Source is to know the code source. The Struts core for example executes 16 (as of Struts 1.1) main functionalities upon every request to the controller. They are in this order processMultipart(request), processPath(request, response), processLocale(request, response), processContent(request, response), processNoCache(request, response), processPreprocess(request, response), processMapping(request, response, path), processRoles(request, response, mapping), processActionForm(request, response, mapping), processPopulate(request, response, form, mapping), processValidate(request, response, form, mapping), processForward(request, response, mapping), processInclude(request, response, mapping), processActionCreate(request, response, mapping), processActionPerform(request, response, action, form, mapping), processForwardConfig(request, response, forward). These are the core functionallities of RequestProcessor. Any of these methods can be customized by the web application architect.

Friday, January 16, 2004

When in doubt call a method such as the open source community or java. Invoke, Execute, and Process are three examples taken from Struts, Tomcat, and Geronimo.
Check out what happens when you hold down the Ctrl button in Eclipse. It displays hyperlinks and opens declarations for the given hyperlink element.
This is a list of current Website Issues : Security, Tab pane taglib, Security taglibs, Internationalization, Session cleanup, Handling dates, Web service daemon, Menu taglibs or Struts menu, Reporting, GIS web service, Struts action delegates, Performance, Multiple VMs Tomcats, Load balancing, Distributed computing machines, Race conditions.
It's a new day. I am glad to hear that the Mars land rover dubbed Spirit has returned some nice photos of Mars.

Thursday, January 15, 2004

Struts session managment tip :


| X |



    | Y |



        | Z |


Given the pages X Y and Z one must access X and Y before accessing Z. One can keep only the id of X and Y in session and have buttons that return which find the data in the database.

Wednesday, January 14, 2004

java -cp %AXISCLASSPATH% org.apache.axis.client.AdminClient -l local://localhost:8080/myWebApp/servlet/AdminServlet deploy.wsdd

I'm searching for ways of implementing the class org.apache.axis.wsdl.WSDL2Java. I am trying a simple command line version. As of this writing there are some classpath or user error from the command line but I managed to get it working in Eclipse by downloading the source for Axis. To get this working I put the source in the Eclipse source path and created a new Run configuration where the Main class is org.apache.axis.wsdl.WSDL2Java, the Program argument(s) are http://localhost:8080/axis/services/SOAPMonitorService?wsdl, the Working directory is E:\axis-1_1\wsdl2java. A VM argument(s) -Duser.dir is required if the Program argument(s) is a not a fully qualified url.

The program generated the following files SOAPMonitorService.java, SOAPMonitorServiceService.java, SOAPMonitorServiceServiceLocator.java, SOAPMonitorServiceSoapBindingStub.java.

A quick way to get web services up and running is the Instant Deployment of jws files. These are the eqivalent of java files with only the extension changed. Publish this in axis and youve got a web service. Very powerful.

Axis clients are easy to develop o.a.axis.client.Call and o.a.axis.client.Service are well described in sample.userguide.example2 of the Axis 1.1 distro.

Blog Archive