java

Java (Indonesian: Jawa; Javanese: ꦗꦮ) is an island of Indonesia. With a population of 143 million, Java is the world's most populous island, and one of the most densely populated places in the world. [read more at http://en.wikipedia.org/wiki/Java]

  • Official Novell Press release here, due mid april 2005
    • A complete Linux Operating System: SUSE LINUX OS built upon the Linux kernel 2.6.11,X.org 6.8.2
    • Multiple intuitive desktop environments: Latest KDE 3.4 and GNOME* 2.10,
    • A comprehensive set of Internet tools: Firefox* 1.0 Web browser; e-mail and instant messaging clients (supporting AOL, Yahoo!, MSN, Novell® GroupWise® Instant Messenger, and more),
    • A complete office suite: OpenOffice.org 2.0 (works with Microsoft* Office documents) ,
    • Leading graphics and multimedia applications: F-Spot photo organizer, the GIMP 2.2 and Inkscape graphics programs, multimedia viewers, CD/DVD burners and more,
    • Fully integrated system security: integrated firewall, spam blocker and virus scanner,
    • World class advanced networking services: Apache Web server, SAMBA, CUPS, DHCP, DNS and popular open source databases
    • Cutting edge new Mobility Support: Improved Wifi connections and Bluetooth devices, PDA and phone synchronization
    • Robust Virtualization: based on XEN (what is XEN?)
    • Voice over IP support
    • Multiple development Tools: Mono® ; KDevelop; Eclipse

    SUSE LINUX 9.3 Professional Review by Novell : not a very neutral review, but with some screenshots...
    Novell Packs Apps Into SuSE Linux 9.3 By David Worthington, BetaNews

     

  • Define a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically.



    Source code

    /**
     * Knows its observers. Any number of Observer objects
     * may observe a subject. Provides an interface for attaching
     * and detaching Observer objects.
     * @role __Subject
     */
    public class Subject {
            private ArrayList observers = new ArrayList();        public void attach(Observer observer) {
                    observers.add(observer);        }
    
            public void detach(Observer observer) {
                    int idx = observers.indexOf(observer);                if (idx != -1) {
                            observers.remove(idx);                }
            }
    
            protected void notifyObservers() {
                    Iterator it = observers.iterator();                while (it.hasNext()) {
                            ((Observer) it.next()).update(this);                }
            }
    
    }
    
    /**
     * Defines an updating interface for objects that
     * should be notified of changes in a subject.
     * @role __Observer
     */
    public interface Observer {
            /**
      * Update method.
      */
            public void update(Subject subject);}
    
    /**
     * Stores state of interest to ConcreteObserver objects.
     * Sends a notification to its observers when its state changes.
     */
    public class ConcreteSubject extends Subject {
    
            // add your subject's specific stuff here
    }
    
    /**
     * Implements the Observer updating interface to keep 
     * its state consistent with the subject's.
     */
    public class ConcreteObserver implements Observer {
            public void update(Subject subject) {
                    // put your code here
            }
    
    }
    
    
    
  • In this post, I will show you how to bring an old webcam of 2000 back to life for the latest iterations of Windows Vista/Seven by injecting the firmware of another webcam into it.

    Philips Webcam ToUcam Pro -  PCVC740K

    Year 2000
    Philips Webcam SPC900NC VGA CCD with Pixel Plus

    Year 2008
    pcvc720k_40_tlf_ spc900nc_27_rtv_

    If you read the Philips Support FAQ

    You will end up with this laconic text: “There are no Vista drivers available for this product due to the product’s age.”

    Although there is an alternate way, that only work with Windows Vista, the solution I propose you is to just make the driver think that it has another webcam plugged in! This work since the reality is that most webcam out there have seen no big hardware changes since many many years. (except packaging/prize and blinking led)

    DISCLAIMER !!! I'm not responsible for damages you could cause to your webcam because of errors in realizing the described firmware upgrade...

     

     

    Success story

    The following webcam got converted successfully:

    • 1 webcam PCVC840K converted into SPC900NC
    • 2 webcam PCVC740K converted into SPC900NC

    The following failed but I was able to recover from the saved firmware:

    • Philips PCVC680 USB VGA Camera; Video

    Contact me if you successfully convert your webcam.

    How to

    You need an Operating system that is still able to recognize your webcam. Most of Philips webcams which are discontinued, and refuse to work under Vista/Seven were working under windows XP. So try to get an access to and old PC running that OS. Lucky owner of Windows 7 professional/Ultimate are able to use “Windows XP mode”.

    Download the software WCRMAC here http://www.burri-web.org/bm98/soft/wcrmac/wcrmac-2.0.85.zip and install it.

    WcRmac allows some internal memory modifications of web cams based on the Philips SAA8115 / 8116 camera chips. That are usually cameras with a 640x480 CCD sensor (various brands).

    Connect the webcam under windows XP, and install eventually the required drivers. At that point you must be to see the webcam and get an image in windows explorer. Leave the webcam running in the background.

    Download the latest firmware of the latest Philips webcam flagship SPC900NC here http://www.home.zonnet.nl/m.m.j.meijer/D_I_Y/spc900nc.bin and copy this file under  the directory

    • C:\Program Files\TWIRG\WcRmac\binary\8116 

    Start WCRMAC and connect the webcam by selecting it under the menu “webcam”

    bin-tab

    Now get to the tab “binaries” and click ''Get current and save as” to make a copy of the existing firmware to disk. Now select the latest firmware in the list spc900nc.bin and click on the button “load”

    Now the webcam should be recognized under Windows vista/ seven (even 64 bits)! It will have all the software goodies of the latest of the latest webcam: faces detection, anti flickering, up to 90 frame per seconds!

     

     

    References

  • Java problem N°1

    On windows NT machine, command line length is limited to 1024 characters!, clearly not enough for a distributed classpath with a lot of frameworks or 3rd party tools.

    Solutions

    • Reduce number of jar files, instead of having 10 jar files, you can try to build only one, use automatic build process, with jakarta ANT during the build and for your deployment. This is often not a good/verybad solution.
    • Put the half classpath size in java ext classpath (if you use resin or tomcat)
    example
    • Use cygwin to start the java process, for example you can use a bash terminal. But do not use cygrunsrv as it was not designed for installing java process as NT service: it wil create a ghost program when you kill the service.
    • Last chance, put the classpath in a .txt file and create a classloader which will read it and set the classpath (adaptative classloader). You must create your own classloader!
  • joomla_cms

    I did optimize a bit my Joomla! homepage in the last few days. This has been achieved with

    • Enabling Joomla module caching in all 3rd party module where it was missing/ not implemented at all,
    • Starting to offload some assets (JavaScript) to faster hosting,

    Click read more to apply the same for your internet site.

    Use Joomla Module caching

    Not all 3rd party Joomla modules are using caching. This means that in worst case, some Joomla! modules may create way too much SQL queries. A way to reduce the load is to activate module caching. You’ll have to go through all 3rd party modules and check that they have in their administrator panel a setting to enable/disable cache.

    jooomla.enable.caching

    You’ll see that 90% of all modules (except official Joomla! modules which are able to deal with caching) are NOT supporting caching. We will change that now:

    For every module without cache, open the xml file at /modules/mod_xxxxxxx/mod_xxxxxxx.xml and add between <params> .. </params>

    <param name="cache" type="radio" default="0" label="Enable Cache" 
           description="Select whether to cache the content of this module">
     <option value="0">No</option>
     <option value="1">Yes</option>
    </param>

    Note that if <params> .. </params> do not exist, just add it like below

    <params>
     <param name="cache" type="radio" default="0" label="Enable Cache" 
           description="Select whether to cache the content of this module">
      <option value="0">No</option>
      <option value="1">Yes</option>
     </param>
    </params>

    Visit or reload the admin panel of that module and set the Enable Cache to Yes.Click Save/Apply at least once.

    Now the output of this module will be saved in /cache and only refresh when global Joomla cache timeout (900 seconds as default). Consider also contacting the author of the module so he can patch his code.

    Offload assets

    Offloading assets (JavaScript, static images, static files) can bring tremendous speed gains, at the cost of resolving more DNS name. Using this technique will help your Apache concentrate on php instead of streaming static data.

    Offload JavaScript

    When you look at Joomla! frontend source code, you will see that the JavaScript library mootols.js is 74kb big. Google is offering to host all major AJAX  libraries free of charge at http://code.google.com/apis/ajaxlibs/documentation/ so why not profiting of their datacenter speed/bandwidth/response time?

    Now the dirty part, You can’t tell Joomla! not to include the mootols.js from /media/system/js/mootools.js at rendering time. We will have to patch the code of Joomla!

    open /libraries/joomla/html/html/behavior.php and search for

    if ($debug || $konkcheck) {
      JHTML::script('mootools-uncompressed.js', 'media/system/js/', false);
    } else {
     //JHTML::script('mootools.js', 'media/system/js/', false); // old Joomla code
     JHTML::script('mootools-yui-compressed.js', 'http://ajax.googleapis.com/ajax/libs/mootools/1.11/', false);
    }

    Joomla use mootools.js in version 1.11, don’t use the latest version (1.2.3) as most Joomla! plugin wont work (but your mileage may vary).

    To be continued

  • ORA-00054: resource busy and acquire with NOWAIT specified
    Cause: Resource interested is busy.
    Action: Retry if necessary.

    I show you here how to get around this error and kill the sessions that are preventing the exclusive lock.

    Note that you could also (preferred)

    • Run your changes later when the database is idle.
    • Do all DDL during a maintenance window when all users are not logged in

    Run in SQL*Plus or SQL developer

    select a.sid, a.serial#  from v$session a, v$locked_object b, dba_objects c 
    where b.object_id = c.object_id 
    and a.sid = b.session_id
    and OBJECT_NAME='YouTableName';

    Then note both the sid and serial and run

    alter system kill  session 'sid,serial#' IMMEDIATE;

    If this still do not work, your last bullet is to kill the Unix process which is still hanging on your database server!

    here is how to find the unix process to kill

    Run in SQL*Plus or SQL developer

    select p.spid,s.sid,s.serial#,s.username,s.status,s.last_call_et,
    p.program,p.terminal,logon_time,module,s.osuser from V$process p,V$session s where s.paddr = p.addr and s.status = 'ACTIVE' and
    s.username not like '%SYS%';

    and finally run a

    kill –9 spid

    if this still don’t not work, your best friend is Google

  • The Oracle error ORA-00054 can be solved by executing as DBA the following query

    select p.spid,s.sid,s.serial#,s.username,s.status,s.last_call_et,
           p.program,p.terminal,logon_time,module,s.osuser 
    from 
           V$process p,V$session s 
    where 
           s.paddr = p.addr and s.status = &39;ACTIVE&39; and 
           s.username not like &39;%SYS%&39;;

    This will return the PID of the hanging process

    You can then SSH to the server ruining oracle and kill the process

    kill -9 PID

     

  • if you encounter this error while starting oracle

    /etc/init.d/oraemctl start Starting Oracle EM DB Console:
    Environment variable ORACLE_UNQNAME not defined. 
    Please set ORACLE_UNQNAME to database unique name. OK
    One possible solution is to edit the script
    # vi /etc/init.d/oraemctl

    and add the following code in blue

    #!/bin/bash
    #
    # oraemctl Starting and stopping Oracle Enterprise Manager Database Control.
    # Script is valid for 10g and 11g versions.
    #
    # chkconfig: 35 80 30
    # description: Enterprise Manager DB Control startup script
    
    # Source function library.
    
    . /etc/rc.d/init.d/functions
    
    ORACLE_OWNER="oracle"
    ORACLE_HOME="/opt/oracle/otk/home"
    ORACLE_HOME="/opt/oracle/otk/home/app/oracle/product/11.2.0/dbhome_1"
    ORACLE_SID=orcl
    
    case "$1" in
     start)
      echo -n $"Starting Oracle EM DB Console:"
      su - $ORACLE_OWNER -c "ORACLE_SID=$ORACLE_SID $ORACLE_HOME/bin/emctl start dbconsole"
      echo "OK"
      ;;
     stop)
      echo -n $"Stopping Oracle EM DB Console:"
      su - $ORACLE_OWNER -c "ORACLE_SID=$ORACLE_SID $ORACLE_HOME/bin/emctl stop dbconsole"
      echo "OK"
      ;;
     *)
     echo $"Usage: $0 {start|stop}"
    ;;
    esac
    ~

    Use of course the right SID, after that Oracle Enterprise manager will start correctly

    # /etc/init.d/oraemctl start
    Starting Oracle EM DB Console:Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
    Copyright (c) 1996, 2009 Oracle Corporation.&160; All rights reserved.
    - An instance of Oracle Enterprise Manager 11g Database Control is already running.
    OK

  • Parser incompatibility or Parser order in Classpath,classloader, loading sequence in a highly complex and distributed environment.

    Especially in a distributed environment, order of parser found is a major problem during the walk of the JVM in classpath. For example, Different versions of the parser SAX are co-existing in the classpath due to components restrictions :
    • Parser sax 1.0 is required for BEA Weblogic 6.0 and Xerces 1.3.1
    • Parser sax 2.0 is required for Xerces 1.4 and crimson
    • Crimson is required for APACHE SOAP 2.2
    • You may want to use Apache soap client because it still accept to run with a JVM 1.2.2

    Try to draw a graph or parser dependancy: determine for all components in your application which DOM level is required.

    Solution 1: Only use one parser Apache Xerces (XML) and only one transformer Saxon (XST) or Apache Xalan (XST). It is not always possible since some 3rd party tools, like weblogic.jar or oracle.jar are coming with some crap inside...

    For example weblogic 6.0 contains a SAX 1.0 (http://edocs.bea.com/wls/docs61/notes/migrate60to61.html) But weblogic 6.1 a SAX 2.0!!!!!

    • Extract from BEA website:
      "Apache XML Parser
      The XML WebLogic Server 6.0 -> 6.1 parser has been updated and is now based on the Apache Xerces 1.3.1 parser. The parser implements version 2 of the SAX and DOM interfaces. Users who used older parsers that were shipped in previous versions may receive deprecation messages."
    • Solutions :
      - Displace the jar file in the classpath, so it will be load after the sax2 compliant parser....
    • And ?
      - Just for being confused, with no change at all, your code may be run if you use BEA Weblogic 6.1!!!!
    • What to retain ?
      - Order of packages loading is very important when working in JAVA.
      - If you are lost, and want to know when a package or class is loaded, you can start java with this parameter: -verbose the default output is System.out
      - You need to check carefully all preconditions before using a new 3rd party component, in order to see if you will not be incompatible with others 3rd party tools.

    Solution 2: Even if you have multiple parser in classpath, you can still force javax.xml factory to use the parser/transformer you want...

    Force Factory: create 3 files and put them in front of classpath in a directory META-INF/services/

    • File named: javax.xml.parsers.DocumentBuilderFactory may contains org.apache.xerces.jaxp.DocumentBuilderFactoryImpl(or org.apache.crimson.jaxp.DocumentBuilderFactoryImpl)
    • File named: javax.xml.parsers.SAXParserFactory may contains org.apache.xerces.jaxp.SAXParserFactoryImpl(or com.icl.saxon.aelfred.SAXParserFactoryImpl)
    • File named: javax.xml.transform.TransformerFactory may contains com.icl.saxon.TransformerFactoryImpl

    OR create 3 java variables when your start your java process:

    java -Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl -Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl -Djavax.xml.transform.TransformerFactory=com.icl.saxon.TransformerFactoryImpl

    OR use system variables, in your code you can type, for each variable (not very flexible):

    System.setProperty("avax.xml.transform.TransformerFactory","com.icl.saxon.TransformerFactoryImpl")

  • This interesting code snippet is from cedTag and let you retrieve WikiPedia description using OpenSearch API. It use the Client Url Library cURL. Released under GPL v3

    /**
     * @param $searchTerm
     * @param string $wikipediaServer
     * @return array|string  [text, description, url]
     */
    public function getDefinitionFrom
    ($searchTerm, $wikipediaServer = 'http://en.wikipedia.org') { $url = $wikipediaServer.
    '/w/api.php?action=opensearch&search=' .
    urlencode($searchTerm) . '&format=xml&limit=1'; $ch = curl_init($url); curl_setopt($ch, CURLOPT_HTTPGET, true); curl_setopt($ch, CURLOPT_POST, false); curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_NOBODY, false); curl_setopt($ch, CURLOPT_VERBOSE, false); curl_setopt($ch, CURLOPT_REFERER, ""); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_MAXREDIRS, 4); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_USERAGENT,
    "Mozilla/5.0"); $page = curl_exec($ch); $xml = simplexml_load_string($page); if ((string)$xml->Section->Item->Description) { return array((string)$xml->Section->Item->Text, (string)$xml->Section->Item->Description, (string)$xml->Section->Item->Url); } return ""; }

  • I've translate the user interface into french of a Linux scrabble version. The game is relatively slow when it load the dictionnary at each start (but the windows version is fast, but  the author will correct this problem).   versions can be download here.
    I will soon prepare a ready to install package for Linux (simply decompress in a directory) with all settings and a working french dictionnary. :-)

  • Here is a How to since it take me a very long time to install something which should have been trivial....
    For the benefit of the community, I am publishing it here on my free time :-)... Enjoy...

    Apache Axis and Apache Axis C++ are implementation of the SOAP ("Simple Object Access Protocol") submission to W3C. From the W3C draft specification:

    SOAP is a lightweight protocol for exchanging structured information in a decentralized, distributed environment. It is an XML based protocol that consists of three parts: an envelope that defines a framework for describing what is in a message and how to process it, a set of encoding rules for expressing instances of application-defined datatypes, and a convention for representing remote procedure calls and responses.

    Axis C/C++ (Axis CPP) is a non-Java implementation of Axis. At its core Axis CPP has a C++ runtime engine. The provided tooling allows you to create C++ client-side stubs and server-side skeletons. The server skeletons can be deployed to either a full Apache web server using the supplied apache module or a "simple_axis_server" - which is a simple HTTP listener (designed to help you test your services).


    1. Download either Apache 2.0 or Apache 1.3
    unpack it to c:\apache

    2. Downloadthe latest version of Axis C++
    unpack it to c:\axis

    Note: try to avoid space in path, it has always been proved to be a mess under Windows.

    3. Open  and add following lines at the end of Apache config file

    Apache 1.3

    in c:\apache\conf\http.conf
    Apache 2.0

    in c:\apache\conf\http.conf
    LoadModule axis_module ../axis/lib/modules/mod_axis.dll
    <Location /axis>
    SetHandler axis
    </Location>
    LoadModule axis_module ../axis/lib/mod_axis2.dll
    <Location /axis>
    SetHandler axis
    </Location>

    4. Now it is starting to be interesting, both mod_axis.dll  and mod_axis2.dll have dependencies to an old dll which do no more exist since windows 98 ! msjava.dll

    You need to copy from Internet msjava.dll into c:\axis\lib
    You also need to copy the xerces parser xerces-c_2_2_0.dll  into c:\axis\lib

    Axiss C++ required library in lib directory

    5. Create a file axiscpp.conf(or search in zip distributions for a template of it) and copy it into c:\axis
    Modify all path to DLL accordingly. Note that relative path or absolute path also work.

    Example of  axiscpp.conf
    # The comment character is '#'
    Available directives are as follows
    #(Some of these directives may not be implemented yet)
    #
    WSDDFilePath:The path to the server wsdd
    LogPath:The path to the axis log
    ClientLogPath:The path to the axis client log
    ClientWSDDFilePath:The path to the client wsdd
    Transport_http:The HTTP transport library
    Transport_smtp:The SMTP transport library
    XMLParser:The xml parser library
    NodeName:Node name
    ListenPort:Listening port
    Channel_HTTP:The HTTP transport channel library
    Channel_HTTP_SSL:The HTTP transport secure channel library

    LogPath:c:\axis\logs\AxisLog.txt
    WSDDFilePath:c:\axis\conf\server.wsdd
    XMLParser:c:\axis\lib\AxisXMLParser.dll
    Transport_http:c:\axis\lib\HTTPTransport.dll
    Channel_HTTP:c:\axis\lib\HTTPChannel.dll
    Channel_HTTP_SSL:c:\axis\lib\HTTPSSLChannel.dll

    6. Go into c:/apache and create a small batch file there 

    example of start script for ApachestartApache.bat
    SET AXIS_HOME=c:\axis
    SET AXISCPP_DEPLOY=c:\axis
    SET PATH=%PATH%;c:\axis\lib
    SET LIB_PATH=%LIB_PATH%;c:\axis\lib

    apache.exe
    pause

    7. create a file in c:\axis\conf\server.wsdd
    Example of c:\axis\conf\server.wsdd
    <?xml version="1.0" encoding="UTF-8"?>
    <!-- The Entity, wspath in the following internal subset allows setting a
         path for the webservices location -->
    <!DOCTYPE vars [ <!ENTITY wspath "/home/sanjaya/Axis/webservices/"> ]>

    <deployment xmlns="http://xml.apache.org/axis/wsdd/"
                xmlns:C="http://xml.apache.org/axis/wsdd/providers/C"
                xmlns:CPP="http://xml.apache.org/axis/wsdd/providers/CPP">
        <globalConfiguration>
        </globalConfiguration>
        <service name="transportProperties"
                 provider="CPP:DOCUMENT"
                 description="This is a simple test">
            <parameter name="className"
                       value="c:\axis\dll\calculator.dll"/>
            <parameter name="allowedMethods" value="add subtract"/>
        </service>
    </deployment>

    Use script 6.  to start Apache, if you get an exception, read it or verify DLL dependencies with DLL dependency walker


    Go In a Browser and type http://localhost/axis

    Axis-cpp-Working-in-apache
  • Some links that may help You preparing the SUN java certification...
  • Specify the kinds of objects to create using a prototypical instance, and create new objects by copying this prototype.



    Source Code

    /**
     * Declares interface for cloning itself.
     * @role __Prototype
     */
    public interface Prototype {
            Prototype createCopy();}
    
    /**
     * Implements an operation for cloning itself.
     */
    public class ConcretePrototype1 implements Prototype {
            protected ConcretePrototype1(ConcretePrototype1 prototype) 
            {
               // initialize new copy with prototype
            }
    
            public Prototype createCopy() {
               return new ConcretePrototype1(this);        
            }
    }
    
    /**
     * Implements an operation for cloning itself.
     */
    public class ConcretePrototype1 implements Prototype {
            protected ConcretePrototype1(ConcretePrototype1 prototype) {
              // initialize new copy with prototype
            }
    
            public Prototype createCopy() {
                    return new ConcretePrototype1(this);        
            }
    }
    
  • Provide a surrogate or placeholder for another object to control access to it. Options are provided to implement all interfaces of the subject class as well as all of the public methods of the subject class



    Source Code

    /**
     * Represents a proxy for Subject
     */
    public class Proxy extends Subject {
    	/**
    	 * Holds the subject instance.
    	 */
    	private Subject subject;
    
    	/** @see patterns.gof.proxy.SubjectsampleMethod() */
    	public int sampleMethod() {
    		return subject.sampleMethod();
    	}
    }
    
    /**
     * Represents a real subject
     */
    
    public class RealSubject extends Subject {
    	public int sampleMethod() {
    		/* something happens here */
    		return 0;
    	}
    }
    
    /**
     * Represents a subject
     * 
     * @role __Subject
     */
    
    public abstract class Subject {
    	/**
    	 * This is sample method to be called by proxy
    	 */
    	public abstract int sampleMethod();
    }
    
  • The file web.xml inside the WEB-INF folder is the Web Application Deployment Descriptor for your application. This is an XML file describing the servlets and other components that make up your application. The file below is what I use at work. It contains better settings than the default one, plus all descriptions of parameters.

    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee   http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
     
    <context-param>
    <description>
    Comma separated list of URIs of (additional) faces             config files. (e.g. /WEB-INF/my-config.xml) See JSF             1.0 PRD2,
    10.3.2 Attention: You do not need to put
    /WEB-INF/faces-config.xml in here.
    </description>
    <param-name>javax.faces.CONFIG_FILES</param-name>
    <param-value>
     /WEB-INF/faces-configs/common-faces-config.xml,
     /WEB-INF/faces-configs/page1-faces-config.xml,
     /WEB-INF/faces-configs/page2-faces-config.xml
    </param-value>
    </context-param>
    Follow Divide and Conquer rule:
    Do not put all your managed beans, navigations rules in one big file. Consider one faces-config per functions or html page.
    <context-param>
    <description>State saving method: "client" or "server"          (= default) See JSF Specification 2.5.3
    </description>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>server</param-value>
    </context-param>
    Server is recommended.
    Ive tried one day client, but HTML pages were 10Mb big!
    <context-param>
    <description>
    Only applicable if state saving method is "server"         (= default) and if
    org.apache.myfaces.SERIALIZE_STATE_IN_SESSION is           true (=default) If true (default) the serialized              state will be compressed before it is written to the session. If false the state will not be compressed.
    </description>
    <param-name>
      org.apache.myfaces.COMPRESS_STATE_IN_SESSION
    </param-name>
    <param-value>true</param-value>
    </context-param>
    You should always balanced cpu/memory usage.
    (Compressing state cost CPU but spare memory...obvious)


    <context-param>
    <description>
    Only applicable if state saving method is "server"             (= default). If true (default) the state will be               serialized to a byte stream before it is written to             the session. If false the state will not be                     serialized to a byte stream.
    </description>
    <param-name>
     org.apache.myfaces.SERIALIZE_STATE_IN_SESSION
    </param-name>
    <param-value>false</param-value>
    </context-param>
    Compressing data save memory bytes on server at the cost of more computational power.
    <context-param>
    <param-name>
    org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION
    </param-name>
    <param-value>5</param-value>
    </context-param>
    Number of back button. Default is 20. far too much. reducing this value decrease memory size.
    <context-param>
    <description>
    This parameter tells MyFaces if javascript code               should be allowed in the rendered HTML output. If             javascript is allowed, command_link anchors will have javascript code that submits the corresponding form. If javascript is not allowed, the state saving info and nested parameters will beadded as url parameters. Default: "true"
    </description>
    <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
    <param-value>true</param-value>
    </context-param>
    <context-param>
    <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
    <param-value>false</param-value>
    </context-param>
    Nothing special here. Most of the time, webpage are full of javascript.
    <context-param>
    <description>The buffer size to set on the response         when the  ResponseWriter is generated.
    By default the value is -1, which will not assign             a buffer size on the response.
    </description>
    <param-name>facelets.BUFFER_SIZE</param-name>
    <param-value>8192</param-value>
    </context-param> 
    Try to set the buffer size to the most common page size.
    <context-param>
    <param-name>facelets.SKIP_COMMENTS</param-name>
    <param-value>true</param-value>
    </context-param>
    In production, no need to let comment in rendered code
    <context-param>
    <description>
    If true, rendered HTML code will be formatted, so             that it is "human readable". i.e. additional line             separators and whitespace will be written, that do             not influence the HTML code. Default: "true"
    </description>
    <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
    <param-value>false</param-value>
    </context-param>
    Cpu waste in production.
    Beautify your code in eclipse.
    Consider instead using Firefox source chart plugin which always beautify and color the source source
    <context-param>
    <description>
    If true, a javascript function will be rendered               that is able to restore the former vertical scroll             on every request.
    Convenient feature if you have pages with long                 lists and you do not want the browser page to                 always jump to the top if you trigger a link or               button action that stays on the same
    page. Default: "false"
    </description>
    <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
    <param-value>true</param-value>
    </context-param>
     
    <context-param>
    <description>
    Validate managed beans, navigation rules and                   ensure that forms are not nested.
    </description>
    <param-name>org.apache.myfaces.VALIDATE</param-name>
    <param-value>true</param-value>
    </context-param>
    Can be turned off in production, if you have a good testing team and many deployment stage This kind of errors should not go un noticed.
    <context-param>
     <param-name>facelets.LIBRARIES</param-name>
    <param-value>
     /WEB-INF/taglib/tomahawk.taglib.xml;
     /WEB-INF/taglib/aa.taglib.xml;
     /WEB-INF/taglib/your.taglib.xml
    </param-value>
    </context-param>
    List here all 3rd party and your own tag library
    <context-param>
    <param-name>facelets.REFRESH_PERIOD</param-name>
    <param-value>2</param-value>
    </context-param>
    <context-param>
    <description>Special Debug Output for Development
    </description>
     <param-name>facelets.DEVELOPMENT</param-name>
     <param-value>false</param-value>
    </context-param>
    <context-param>
     <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
     <param-value>.xhtml</param-value>
    </context-param>
    			Using a 
    			facelets.REFRESH_PERIOD >= 1 
    			means that templates 
    			will be reloaded after 
    			a given period if the
    			file has been modified 
    			on the file-system.
    			

     

     

     

     

    Obvious settings

    <filter>
    <filter-name>extensionsFilter</filter-name>
    <filter-class>
     org.apache.myfaces.webapp.filter.ExtensionsFilter
    </filter-class>
     <init-param>
      <param-name>uploadMaxFileSize</param-name>
      <param-value>100m</param-value>
    </init-param>
    <init-param>
     <param-name>uploadThresholdSize</param-name>
     <param-value>100k</param-value>
    </init-param>
    </filter>   
    Some security settings. Consider settings these values accordingly to your needs.
    <error-page>
     <error-code>404</error-code>
     <location>/error.jsp</location>
    </error-page>
           
    <error-page>
     <error-code>500</error-code>
     <location>/error.jsp</location>
    </error-page>
           
    <error-page>
     <exception-type>java.lang.Exception</exception-type>
     <location>/error.jsp</location>
    </error-page>
    Standard settings not related to JSF. Never reveal any useful informations in error pages!

       
  • BETA release

    Attention: this kind of mod is intended for developer or Joomla site with high number of visitors and facing performances issues.

    A small HOWTO, a more comprehensive documentation can be found in my WIKI. A new forum board has also been started for support, bugs and your comments.

    Install

    The component com_minify like any Joomla component

    Check proper installation

    1. Use the menu entry "Check/System", at least the file cache at components/com_minify/cache has to be writable by apache/PHP!
    2. Activate the URL Builder under "settings"
    3. Drag and Drop the Bookmarklet tool in your Firefox Bookmark Toolbar

    minify4joomla.4

    so it look like:

    minify4joomla.1

    Go to your Joomla frontend

    And click on the bookmark tool "Create Minify URL's", a new tab or pop up will open:

    minify4joomla.2

    In A, the tool will present You all JavaScript and CSS it has detected in the page, Remember this may change if you are a public or a registered user, this may also change if you remove or add module and&160; plugin!

    Removing JavaScript/CSS HTTP requests

    Now in that list, decide which JavaScript files can be combine (most of the time it is all, but you may want to create bundle of them if that is making sense), simply click on the blue link you want to add to the combine list.

    Here for the example I select them all (also add securityimages.js):

    minify4joomla.3

    Note:

    • That I have a base Joomla1.5.8 and did not install Joomla in the root directory of my local web server.
    • You can not mix JavaScript and CSS in one minify URL, this is limitation of HTML tags that are different for JavaScript and CSS.
    • mootools.js and caption.js can be group under the group name jbasejs for example and thus reuse.

    Click now the [Update] button, the URL query Builder present you the text below that is self explanatory

    Place this URI in your HTML to serve the files above combined, minified, compressed and with cache headers.

    URI
    /components/com_minify/b=Joomla1.5.8&f=media/system/js/mootools.js,media/system/js/caption.js,
    &160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160; components/com_securityimages/js/securityImages.js (opens in new window)

    HTML
    <script type="text/javascript" src="/components/com_minify/b=Joomla1.5.8&amp;f=media/system/js/mootools.js,
    &160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160;&160; media/system/js/caption.js,components/com_securityimages/js/securityImages.js"></script>

    How to serve these files as a group

    For the best performance you can serve these files as a pre-defined group with a URI like: /components/com_minify/g=keyName

    To do this, add a line like this to /components/com_minify/groupsConfig.php:

    return array(
       ... your existing groups here...

    &160;&160;&160;&160;&160;&160; 'keyName' => array('//Joomla1.5.8/media/system/js/mootools.js',
    '//Joomla1.5.8/media/system/js/caption.js',
    '//Joomla1.5.8/components/com_securityimages/js/securityImages.js'),
    );

    Make sure to replace keyName with a unique key for this group.

    In your Joomla! templates /templates/xxxxxxx/index.php

    1. Remove all reference to static JavaScript include by first commenting them if you have no backup.
    2. Add this line in the <head> of your template
      <script type="text/javascript" src="/components/com_minify/b=Joomla1.5.8&amp;
      &160; f=media/system/js/mootools.js,media/system/js/caption.js,components/com_securityimages/js/securityImages.js"></script>
      or better this one if you did defined a group fjs (frontendjs)
      <script src="/Joomla1.5.8/components/com_minify/?g=fjs" type="text/javascript"></script>
    3. Remove all dynamically added JavaScript by : see later in article

    You did avoid 3 HTTP requests for including JavaScript, and only need one now!

    Do the same for all CSS, here it is 6 CSS file for the default templates rhuk_milkyway

  • Remove all reference to static CSS include
  • Add this line in the <head> of your template
    <link rel="stylesheet" href="/Joomla1.5.8/components/com_minify/index.php?g=css" />

    You did avoid 6 HTTP requests for including JavaScript, and only need one now!

    Remove all dynamically added JavaScript

    • This is currently a bit dirty, as Joomla! do not have any hook where com_minify can detect that a Joomla! plugin is trying to&160; insert a new JavaScript or CSS in head of the document. In fact minify would have its place in /libraries ideally.
    • I am trying to find a better/more elegant solution than this one (modifying JResponse), but this one work at the moment.
    • If you start modifying the front end, I highly recommend you to minify also the Joomla back end template.

    Open libraries\joomla\html\html\behavior.php and alter the class JHTMLBehavior

    and comment lines like

    JHTML::script('caption.js');

    when you are sure that you did minify the script caption.js for both front end and&160; back end.

    Test proper operations

    1. Test both your front end and&160; back end!
    2. Using YSLOW or by looking at HTML source code, check that not any other JavaScript or CSS is inserted anymore except by com_minify
    3. Check the cache content
      minify4joomla.check.system
    4. Switch the URL builder OFF for non obvious security reasons.

    &160;

    My site use it NOW :-) but not for all js and css at the moment

    • Refactore your code as soon as it is working, http://www.refactoring.com 
    • Refactore your code if you have too many comments or do not understand ithem
  • And Tadaaa  I  finish the refactoring of BloggX, a java GPL component:

    Blogg-X is a cross platform (OS X, Windows XP, Linux) content management tool for websites based on the Joomla! CMS.  Blogg-X runs locally on your computer as a desktop application.  Utilizing built in WYSIWYG and HTML source editors you can post rich content on your Joomla! site without the use of the web browser.

    Refactoring is a  technique for restructuring an existing code, altering its internal structure without changing its external behavior. Its heart is a series of small behavior preserving transformations. Each transformation (called a 'refactoring') does little, but a sequence of transformations can produce a significant restructuring. Since each refactoring is small, it's less likely to go wrong. The system is also kept fully working after each small refactoring, reducing the chances that a system can get seriously broken during the restructuring

    And I want to show here some results achieved, The author has done a great job, and I have tried to bring my Java expertise to help him bring new functionnalities faster. Moreover a JAVA break just for fun (but hehe  I already do Java at work :-) ) was needed after being so frustrated with PHP...

    But let me be a little more technical, below are some numbers create with a tool of IBM: Structural Analysis for Java:   Structural Analysis for JavaTM (SA4J) is a technology that analyzes structural dependencies of Java applications in order to measure their stability. It detects structural "anti-patterns" (suspicious design elements) and provides dependency web browsing for detailed exploration of anti-patterns in the dependency web. SA4J also enables "what if" analysis in order to assess the impact of change on the functionality of the application; and it offers guidelines for package re-factoring.


    Before: BloggX 2.11 After BloggX  refactoring Remarks
    Summary

    The overall stability of the system is 69%

    There are 24 objects, forming a total of 139 relationships. The typical object in this system immediately depends on 5.79 objects. On average, the modification of one object potentially affects 7.2 other objects.

    The overall stability of the system is 87%

    There are 82 objects, forming a total of 292 relationships. The typical object in this system immediately depends on 3.56 objects. On average, the modification of one object potentially affects 10.3 other objects.

    Highly stable systems are typically above 90%.

    Yes the system before was 69% but it was containing methods of 700 lines...
    Statistics
    Property Value
    Number of Objects 24
    Number of Packages 4
    Number of Relationships 139
    Maximum Dependencies 39
    Minimum Dependencies 0
    Average Dependencies 5.79
    Maximum Dependents 25
    Minimum Dependents 1
    Average Dependents 5.79
    Relationship To Object Ratio 5.79
    Affects on Average 7.2
    Property Value
    Number of Objects 82
    Number of Packages 19
    Number of Relationships 292
    Maximum Dependencies 44
    Minimum Dependencies 0
    Average Dependencies 3.56
    Maximum Dependents 20
    Minimum Dependents 0
    Average Dependents 3.56
    Relationship To Object Ratio 3.56
    Affects on Average 10.3
    Explosion of number of Objects and relationship: BloggX  is an ambitious project and functionnalities has to be distributed...
    Structural patterns
    Pattern Count % of total objects
    Tangle
    group of interdependent objects
    5 n/a
    Global Hub
    often affected when any object in the system changes and then affects a lot of other objects
    11 45%
    Global Breakable
    often affected when any object in the system changes
    11 45%
    Global Butterfly
    when changed may cause a lot of other objects to change
    17 70%
    Local Hub
    immediately depends on a lot of objects and a lot of objects immediately depend on it
    0 0%
    Local Breakable
    immediately depends on a lot of objects
    2 8%
    Local Butterfly
    a lot of objects immediately depend on it
    2 8%
    Pattern Count % of total objects
    Tangle
    group of interdependent objects
    4 n/a
    Global Hub
    often affected when any object in the system changes and then affects a lot of other objects
    9 10%
    Global Breakable
    often affected when any object in the system changes
    27 32%
    Global Butterfly
    when changed may cause a lot of other objects to change
    15 18%
    Local Hub
    immediately depends on a lot of objects and a lot of objects immediately depend on it
    0 0%
    Local Breakable  
    immediately depends on a lot of objects
    2 2%
    Local Butterfly
    a lot of objects immediately depend on it
    4 4%
    Al lot better after all changes i've made :-) but not perfect ;-)

    A lot of cleaned interface are still missing.

    Exploring relationship tn_before-BloggX-Refactoring-www.waltercedric.com.jpg tn_after-BloggX-Refactoring-www.waltercedric.com.jpg

    Distance graph distanceGraphbefore.gif distanceGraphAfter.gif The distance is a calculated value, that describes the encapsulation of a certain package
    While a distance of "0" means a "perfect" encapsulation, 1 stands for a complete lack of encapsulation.

    A lot of the code is below the medium line now, but still too high





    As side effect, I correct some bugs by removing duplicated code and non obvious by better localizing  responsabilities. Now the author will need time to understand all changes I've done, but overall It will be easier to maintain BloggX

    One of the best book about Refactoring, which has change my life of developer in 2002  is

    Refactoring-Fowler-Small.jpg Refactoring: Improving the Design of Existing Code
    by Martin Fowler, Kent Beck, John Brant, William Opdyke, Don Roberts
    464 pages
    Publisher:
    Addison-Wesley Professional; 1st edition (June 28, 1999)
    ISBN: 0201485672

     Martin Fowler  also explain why and how you can convince your manager you have to invest daily refactoring time.
  • seleniumhq

    Selenium has various projects that can be combined with each other to create a robust testing environment.

    • Selenium IDE: a Firefox add-on to record and playback tests in Firefox.
    • Selenium Remote Control: a client/server system to control web browsers locally or on other computers, using almost any programming language and testing framework.
    • Selenium Grid: transparently distribute your tests on multiple machines so that you can run your tests in parallel, cutting down the time required for running in-browser test suites. In-browser tests are inherently slow, but since commodity hardware is insanely cheap nowadays there is no excuse for not running all these tests in parallel on multiple machines and dramatically speeding up your feedback cycle. .
    • Selenium Core: JavaScript-based testing system.

    Also there are Selenium projects specifically for Rails, Ruby & Eclipse!

    Today I will show you how to make run some components of Selenium as Windows Services. I am using a Selenium HUB and 4 Selenium RC running all on the same server (while not recommended for performance reasons, it is the easiest setup)

    In this small how to I provide you at the end of the article a ready to use Selenium Grid 0.7 zip file

    Running selenium HUB as an NT service

    The Selenium Hub is in charge of

    • Allocating a Selenium Remote Control to a specific test (transparently)
    • Limiting the number of concurrent test runs on each Remote Control
    • Shielding the tests from the actual grid infrastructure

    Selenium Grid Setup

    1. Download and unzip Selenium Grid.
    2. If you don't have it already, download and install the JDK 
    3. Download Java Service Wrapper (Windows x86 Community Edition) and unzip it.
    4. Create these folders in the Selenium Grid folder: *logs*, *conf*, *bin*. so it look like
    Before After

    selenium-grid-1.0.7
    ├───doc
    ├───examples
    ├───lib
    ├───sample-scripts
    └───vendor

    selenium-grid-1.0.7
    ├───bin
    ├───conf

    ├───doc
    ├───examples
    ├───lib
    ├───logs
    ├───sample-scripts
    └───vendor

    Copy/rename files from the JSW folder to the Selenium Grid folder:

    • \src\conf\wrapper.conf.in to \conf\wrapper.conf
    • \src\bin\App.bat.in to \bin\SeleniumGrid.bat
    • \src\bin\InstallApp-NT.bat.in to \bin\InstallSeleniumGrid-NT.bat
    • \src\bin\UninstallApp-NT.bat.in \bin\UninstallSeleniumGrid-NT.bat
    • \bin\wrapper.exe to \bin\wrapper.exe
    • \lib\wrapper.dll to \lib\wrapper.dll
    • \lib\wrapper.jar to \lib\wrapper.jar

    Now edit the file \conf\wrapper.conf

    Set the location of Java.exe by editing the line

    wrapper.java.command=java

    And making sure to not quote the path even if it has spaces in it


    Replace the  key wrapper.java.classpath.1=... with these three lines:

    wrapper.java.classpath.1=..
    wrapper.java.classpath.2=../lib/selenium-grid-hub-standalone-1.0.7.jar
    wrapper.java.classpath.3=../lib/wrapper.jar


    Change key wrapper.app.parameter.1=+" to:

    wrapper.app.parameter.1=com.thoughtworks.selenium.grid.hub.HubServer

    And finally set up the names/display names for the service:

    wrapper.console.title=Selenium Grid Hub 
    wrapper.ntservice.name=selenium-grid-hub
    wrapper.ntservice.displayname=Selenium Grid Hub
    wrapper.ntservice.description=Central control server for Selenium Grid

    Test your configuration by running the \bin\SeleniumGrid.bat file.

    If it works, you should see Selenium Grid Hub running in the console - one of the the last lines will likely say something about Jetty and you may see some of the Selenium Grid configuration fly past as it's starting up. You can shut it down by pressing Ctrl+C.


    If it's not working, you'll probably see error messages about how the JVM wasn't found (meaning the path to Java is no good) or some other configuration problem. Or the batch file might run and close immediately.

    Once it's running with the SeleniumGrid.bat file, you can install the service by running the InstallSeleniumGrid-NT.bat file.

    To start the service, you can use the command line (net start selenium-grid-hub) or the GUI (Start->Administrative Tools->Services).

    Running multiple selenium RC as NT services

    Selenium Remote Control (RC) is a test tool that allows you to write automated web application UI tests in any programming language against any HTTP website using any mainstream JavaScript-enabled browser.

    Selenium RC comes in two parts. 

    1. A server which automatically launches and kills browsers, and acts as a HTTP proxy for web requests from them.
    2. Client libraries for your favorite computer language.

    Following the same idea, with only some minor changes due to the way selenium RC are started in wrapper.conf

    First install all browsers or only some that you would like to support:

     allBrowser

    Google Chrome, Mozilla Firefox, Apple Safari to name a few, Dont forget that you MUST put them in windows environment variable PATH, so Selenium RC will be able to start them.

    Then create for each browser you would like to support the following directory structure

    Before After

    selenium-grid-1.0.7
    ├───bin
    ├───conf
    ├───doc
    ├───examples
    ├───lib
    ├───logs
    ├───sample-scripts
    └───vendor

    selenium-grid-1.0.7
    ├───bin
    ├───conf
    ├───doc
    ├───examples
    ├───lib
    ├───logs
    ├───rc.chrome
    ├───rc.firefox
    ├───rc.ie
    ├───rc.safari

    ├───sample-scripts
    └───vendor

    Move files around from previous example, so that it look like

    Result
    rc.chrome
    ├───bin
    │       InstallRemoteControl-NT.bat
    │       RemoteControl.bat
    │       UninstallRemoteControl-NT.bat
    │       wrapper.exe

    ├───conf
    │       wrapper.conf

    └───logs

    Here are the settings of wrapper.conf for Google chrome that you need to change across the file, Change all values according to your setup.

    wrapper.ntservice.account=.\selenium
    wrapper.ntservice.password=selenium

    # Java Classpath (include wrapper.jar) Add class path elements as # needed starting from 1 wrapper.java.classpath.1=.. wrapper.java.classpath.2=../../lib/selenium-grid-remote-control-standalone-1.0.7.jar wrapper.java.classpath.3=../../lib/selenium-grid-hub-standalone-1.0.7.jar wrapper.java.classpath.4=../../vendor/selenium-server-1.0.3-standalone.jar wrapper.java.classpath.5=../../lib/wrapper.jar # Application parameters. Add parameters as needed starting from 1 wrapper.app.parameter.1=com.thoughtworks.selenium.grid.remotecontrol.SelfRegisteringRemoteControlLauncher wrapper.app.parameter.2=-port "5558" wrapper.app.parameter.3=-host "localhost" wrapper.app.parameter.4=-hubURL "http://localhost:4444" wrapper.app.parameter.5=-env "*googlechrome" wrapper.app.parameter.6=-hubPollerIntervalInSeconds "30" wrapper.app.parameter.7=-log "..\logs\chrome.log" wrapper.app.parameter.8=-timeout "15" # Name of the service wrapper.name=selenium-chrome # Display name of the service wrapper.displayname=selenium-chrome # Description of the service wrapper.description=selenium-chrome # Java Library Path (location of Wrapper.DLL or libwrapper.so) wrapper.java.library.path.1=../../lib

    You get the idea, for every browser, you have to repeat the same procedure. The only difficult point not documented anywhere is that you can not run the browser with the windows local account, you need to use the windows user that has installed the browser or at least has enough right to create a new browser profile. Failing to do it, will throw a null pointer exception while trying to get a new Google Chrome browser session.

    So you must have a valid user under these 2 keys, you can choose what you want

    wrapper.ntservice.account=.\selenium
    wrapper.ntservice.password=xxxxxxxx

    Once it's running with the RemoteControl.bat file, you can install the service by running the InstallRemoteControl-NT.bat file.

    To start the service, you can use the command line (net start selenium-chrome) or the GUI (Start->Administrative Tools->Services).

    Anyway head to the download section and use a ready to use package

     

    How to give the selenium user the permission to "Start a session as a service".

    Thanks to Eric Bouchut for submission

    You need to give the selenium user the permission to start the session as a service, If you don’t do this, the service won't start at least on Windows XP/SP 3.
    Here it is.
    "For the service to start as the selenium user, you need to  give the selenium user the permission to "start a session as a service", as so:

    • Open the Control Panel
    • Click  "Administration Tools"
    • Click "Local Security Settings" (my attempt to translate "Stratégie de Sécurité Locale" in English)
      • In "Local Policies / User Rights Assignment"
      • Double click "Open a session as a service"
        • add the selenium user to the list

    Download

    Original version of selenium-grid-1.0.7-bin.zip if you want to compare the changes i’ve made.

    Ready to use Selenium-Grid 1.0.7 with all the above scripts configured, all the above in one file selenium-grid-1.0.7-bin-modified.NT.services.zip (22MB)

    Happy Integration Testing with Selenium!

  • There is a lot of shareware and freeware (jEdit, Notepad++) to do complex search and replacement in files but none is supporting these kind of operations in zip files spread across many subdirectories. Luckily Oxygen Editor can

    • Do case sensitive or insensitive searches,
    • Search and replace across multiple files in multiple subdirectories,
    • Search and replace also in ZIP files,
    • Advanced regular expression search/replace,
    • Is free to evaluate for 30 days!

    Use the Menu "Find" and select "Replace in Files" or use the shortcut CTRL+SHIFT+H

    Search_And_Replace_Within_Zip_Files_With_OxygenXMLEditor

    Oxygen can also create backup of every changed zip files,&160; as xxxxxxx.zip.bak as shown in the picture above.

  • I know that Secure, Safe, Fast Linux Hosting sound silly as nothing can be fast and secure at the same time, but I've compiled a list of things that are worth doing if you are maintaining your own server. This list is clearly targeted for people running an open source stack made of Apache, MySQL, PHP and Linux.

    This list is an ongoing work, thta is why it has also a version number in it (v1.0). As soon as I will learn new tricks, the list will be updated.

    By clicking read more, You'll be able to go through the checklist, or maybe you'll prefer the mindmap version HERE

     

  • This list is an ongoing work and since the version 1.0 (01 March 2008), a lot of nodes/ideas have been added.

    Secure, Safe, Fast Linux Hosting sound silly as nothing can be fast and secure at the same time, but I've compiled a list of things that are worth doing if you are maintaining your own server. This list is clearly targeted for people running an open source stack made of Apache, MySQL, PHP and Linux.

    By clicking read more, You'll be able to go through the checklist, or maybe you'll prefer the mindmap version HERE

    The next mind map will be a how to forensic a hacked Linux server...

  • This list is an ongoing work and since the version 1.0 (01 March 2008), a lot of nodes/ideas and now links have been added. The tree is also now a  lot more structured...

    Secure, Safe, Fast Linux Hosting sound silly as nothing can be fast and secure at the same time, but I've compiled a list of things that are worth doing if you are maintaining your own server. This list is clearly targeted for people running an open source stack made of Apache, MySQL, PHP and Linux.

    By clicking read more, You'll be able to go through the checklist as HTML, or maybe you'll prefer the mindmap version HERE

     

    mindmap

    powered by Freemind, free mind mapping