RSS

ATG 9.1 on Mac OS X 10.6

Using the instructions from Ronald Pulleman (which focus on ATG 2007.1), I tried installing ATG 9.1 on Mac OS X 10.6.2. Below are the instructions for reproducing what worked for me.

Make sure you know what is officially supported by ATG, since Mac OS X is not. Also make sure you have the Installation Guide handy, part of the ATG 9.1 documentation set.

Below I refer to the .profile file for adjusting environment variables. Make sure you apply these environment variable changes each time. If you do not use bash, then replace .profile with whatever your shell reads on startup.

Install and configure MySQL

  • Have MySQL installed; I picked MySQL 5.1.45 (64-bit), but 5.1.32 would have been supported.
  • Add this your .profile:

    export MYSQL_HOME=/usr/local/mysql-5.1.45-osx10.6-x86_64
    export PATH=$MYSQL_HOME/bin:$PATH

  • In your System Preferences application, start MySQL and make it start automatically at boot.
  • Change the password of the root user, for obvious reasons:

    mysqladmin -p -u root PASSWORD newpass

  • Make MySQL use the InnoDB engine by default, this is required for ATG: Create the file /etc/mysql/my.cnf with the following contents:

    [mysqld]
    default-storage-engine=innodb
    sql-mode=TRADITIONAL

Install and configure JBoss

  • Install JBoss; I used JBoss 4.2.3-GA (community edition), while the (paid) JBoss EAP 4.2.0 CP05 would be the ATG-supported version.
  • Add this to your .profile:

    export JBOSS_HOME=$HOME/jboss-4.2.3.GA
    export PATH=$JBOSS_HOME/bin:$PATH

  • Modify the JVM arguments in the startup script, if you want to comply with the ATG recommendations for JVM parameters. Edit the bin/run.sh file and modify the JAVA_OPTS setting as follows:

    JAVA_OPTS="-server -Xms2048m -Xmx3072m -XX:MaxPermSize=768m -XX:MaxNewSize=768m -Dsun.rmi.dgc.server.gcInterval=3600000 -Dsun.rmi.client.gcInterval=3600000"

Integrate MySQL with JBoss

  • Download the MySQL JDBC driver Connector/J, I got version 5.1.12.
  • Copy the Connector/J JAR file to the server/atg/lib directory under the JBoss home directory:

    cp ~/Downloads/mysql-connector-java-5.1.12/mysql-connector-java-5.1.12-bin.jar $JBOSS_HOME/server/atg/lib/

Install and configure ATG

  • Download ATG 9.1 from the ATG support site, this is a JAR file.
  • Unpack it and then execute the contained .bin file:

    unzip ATG9.1.jar
    sh ATG9.1.bin

    Choose JBoss as the application server. I suggest you make sure there is no space in the name of the destination director (I chose ~/atg-9.1).

  • Put your license keys in the home/localconfig/ directory (below the ATG installation directory).
  • Create the file home/bin/dasEnv.sh with just one line in it:

    export ATGJRE=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Commands/java

  • Create the file home/localconfig/atg/dynamo/service/jdbc/JTDataSource.properties with the following contents:

    JNDIName=java:/MySqlDS
    $class=atg.nucleus.JNDIReference

Initialize the ATG database

  • Under the JBoss directory, create the file server/atg/deploy/mysql-ds.xml with the following contents:

    <datasources>
    <local-tx-datasource>
    <jndi-name>MySqlDS</jndi-name>
    <connection-url>jdbc:mysql://127.0.0.1:3306/atg000</connection-url>
    <driver-class>com.mysql.jdbc.Driver</driver-class>
    <user-name>atg</user-name>
    <password>atgpass</password>
    <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>
    <valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLValidConnectionChecker</valid-connection-checker-class-name>
    <metadata>
    <type-mapping>mySQL</type-mapping>
    </metadata>
    </local-tx-datasource>
    </datasources>

  • Log in to the MySQL command line client mysql:

    mysql -p -u root

  • Create a database user for ATG:

    USE mysql
    INSERT INTO user (host, user, password) VALUES ('%', 'atg', PASSWORD('atgpass'));

  • Create a database for ATG:

    CREATE DATABASE atg000;

  • Allow the atg user all access privileges on the atg000 database:

    GRANT ALL PRIVILEGES ON atg000.* TO atg;
    FLUSH PRIVILEGES;

  • Exit the mysql client (you can use Ctrl-D).
  • Create the ATG data structures in the database by executing the DDL scripts on MySQL (this typically takes less than a minute):

    cat DAS/sql/install/mysql/das_ddl.sql DPS/sql/install/mysql/dps_ddl.sql DSS/sql/install/mysql/dss_ddl.sql DCS/sql/install/mysql/dcs_ddl.sql | mysql -D atg000 -u atg -patgpass

Run ATG

  • Deploy an ATG application to JBoss.
  • Start JBoss: Go to the JBoss directory and execute:

    bin/run.sh -c atg

  • Using a browser visit http://127.0.0.1:8080/dyn/admin/ to see the DynAdmin tool.
 
10 Comments

Posted by on 30 March 2010 in atg, darwin, jboss, mac, macos, macosx, mysql

 

Keep Your (Webmail?) Session Open

If you have a website that keeps expiring your session after a while, and you want to work around that, then try out the SessionAlive extension for Firefox. I find it extremely useful, especially for webmail (such as Microsoft Outlook Web Access).

The extension works OK in Firefox 3.6.

 
Leave a comment

Posted by on 17 February 2010 in extension, firefox, sessionalive, webmail

 

Experimental XINS 3.0-alpha4 Released

>Just now I’ve tagged 3.0-alpha4 on my experimental XINS-fork. Changes since 3.0-alpha3:

  • newer version of Logdoc, which no longer requires a DTD to be set
  • JMX port can be specified on the command line, e.g. “xins run-abc -Djmx.port=2090”
  • APIs using Logdoc actually have proper code (Log.java and TranslationBundle*.java files) generated
  • the 3 Library classes (in common, client and server) actually return the version of the library (instead of null) based on the meta information available from the JAR manifest
  • fixed client-side transaction logging, it actually works now
  • the _GetVersion meta-function now also returns the current Logdoc version
  • the _GetStatistics meta-function now supports a “targetFunction” parameter, to reduce the output to the statistics of one function only
  • the _GetStatistics meta-function now also returns the transaction ID for each call that information is provided for
  • _GetStatistics not only returns the average, but variance as well (compute the standard deviation from that by taking the square of it)
  • fixed and improved the unit tests

Go check it out at http://github.com/znerd/xins/tree/xins-3.0-alpha4.

 
Leave a comment

Posted by on 16 February 2010 in xins.xins3

 

XINS 2.x and my Experimental XINS 3.0-Fork

>After some investigations by myself and a constructive discussion with Anthony Goubard
(maintainer of the official XINS project) we have decided to backport features from my XINS 3-fork upstream instead of the other way around. Features will be discussed and ported one by one. This is the safest approach, leaving the baseline stable and only introducing changes gradually.

Expect some changes to go into the upcoming XINS 2.3 release, while most will come into the picture only after that.

Stay tuned for updates.

 
Leave a comment

Posted by on 11 February 2010 in xins, xins3

 

XINS 3.0 Alpha3 and Logdoc 0.2

>I’ve just released the 3.0-alpha3 version of my XINS fork, which includes the also just released Logdoc 0.2. See:

Compared to version 0.1, Logdoc 0.2 is cleaned up: the internal logging output is now sent via Ant, meaning that the Ant options -verbose and -debug are needed to see all output. This improves usability.

XINS 3.0-alpha3 introduces lots of small changes, mostly cleanup and minor corrections. A functional change is the introduction of client-side transaction logging via the log messages 2300 and 2301. The former includes the input/output parameters, while the latter does not.

Note that my XINS 3.0 fork is based off XINS 2.2-alpha2. Porting the changes from the 2.x branch to my 3.0-fork is one of my next challenges. Help in this area would be much appreciated! If you are keen and precise and know a bit about Java coding, let me know via ernst [at] ernstdehaan com.

 
Leave a comment

Posted by on 23 January 2010 in logdoc, xins

 

XINS 3.0 Alpha2 and Logdoc 0.1

>Just now I’ve released the 3.0-alpha2 version of my XINS branch, at:

Main feature is that Logdoc has been factored out into its own project, of which I’ve released version 0.1:

Logdoc is used to specify log mesages separate from code, generating both Log4J code and web documentation.

Possibly Logdoc can be extended to support code generation to other environments, including Apache Commons Logging, Log4PHP, Log4C, etc.

Another change made to XINS is that all source code is now under src/java making it much easier to work on XINS from an IDE.

So most of the previously presented random ideas have been implemented already…

 
Leave a comment

Posted by on 11 January 2010 in logdoc, xins

 

Random Ideas for XINS and Logdoc

>Here’s a random list of possible enhancements to XINS.

First, a couple of changes that would make it much easier to configure an IDE (such as Eclipse or NetBeans) to work with XINS:

  • Move all Java source code to src/java/; currently it is spread out over src/java-common, src/java-client-framework and src/java-server-framework. Still, the JAR files can remain the same.
  • Put the generated Java source files also under src/java/, such as the Log and TranslationBundle classes.
  • Put all generated class files under build/classes/.
  • Make the Library classes detect the XINS version at runtime, instead of using a text replacement technique to modify the source code before compiling it.
Then some ideas on Logdoc:
  • Split out Logdoc from XINS. It’s not needed inside XINS, all it needs is a JAR file and some Ant tasks for generating some stuff (like the Java source files and the documentation).
  • Make it easy to plug in a different logging library. Currently, Logdoc generates Log4J code, but it should be fairly simple to make it generate code for other logging libraries. It doesn’t mean Logdoc should actually implement this, but it would at least facilitate it.
To be continued.
 
1 Comment

Posted by on 30 December 2009 in java, logdoc, xins, xins3

 

XINS 3.0 Alpha1 Tagged (Fork at Github)

>Just now I’ve created a tag for XINS 3.0-alpha1 in my XINS-fork at GitHub:

From a runtime-stability point of view, I expect this release just works, even if it is tagged as an alpha-release. At least for me this branch has been running in production for a couple of years now.
However, do note that from a development perspective, a lot of things may change before this goes into (or becomes) an official XINS 3 release. This requires agreement with other involved parties, especially Anthony Goubard (official XINS maintainer) and Online (copyright owner of most of the code).
Some of the things still high on my TODO-list:
  • get rid of all deprecation warnings by either resolving or suppressing them, depending on what is more appropriate
  • further change the code to use type-safe collections where possible, using generics
  • merge with official XINS 2.x changes
 
Leave a comment

Posted by on 28 December 2009 in xins, xins3

 

Command Line Input in Java

>

Today, someone introduced me to Spring Roo, which has quite some similarities with XINS at first glance. I really like the command line shell interface Roo has, featuring unbuffered text input, completion and fancy colors. I know it’s not even close to a rich IDE like NetBeans or Eclipse, but I love command line tools for their productivity and simpicity.

Looking at some documentation, the text-based shell interface is implemented using these technologies:

  • JLine – Library for handling console from Java, unbuffered.
  • JAnsi – Library for using ANSI escape sequences to format console output.
  • JNA – Windows-specific library for displaying colored output on Windows-systems.

Both libraries work on Windows, Mac OS X and Linux/UNIX-systems. Definitely worth considering in case you want to implement a console application in Java.

PS. Upon further inspection, Roo is very different from XINS, though. Roo is an aspect-oriented build-time code generator/manager that generates JSPs, Spring code, Java plumbing code (such as toString() methods), while XINS is an RPC-oriented component technology framework that also has (optional) runtime components (both client- and server-side, if you wish).

 
Leave a comment

Posted by on 28 December 2009 in jansi, java, jline, jna, roo, spring

 

XINS 3.0 Fork at Github

>Just recently, I’ve made our internal XINS fork available via:

The version is currently set at 3.0-alpha1-dev. This may become the official XINS 3.0 release at some point, or (some or all) changes may go into an official XINS release.

The most important changes in compared to mainstream XINS are:

  • Java 5-features, such as generics and foreach-loops (hence Java 5+ is required)
  • lots of utility functions are added, to simplify programming with XINS
  • various libraries are updated, such as Saxon (from 8 to 9) , JUnit (from 3 to 4), Xerces, etc.
  • a couple of previously deprecated members and classes are removed, most notably FastStringBuffer and FastStringWriter
  • deprecated various classes and members, such as the ElementBuilder class
  • upgraded from XSLT 1.0 to 2.0
  • the Element class now supports mixed content (PCDATA and child elements), an add(String) method has been added

This branch of XINS has been used in production for almost 3 years now, but you are not advised to use this code in production, as it has not gone through all the testing that is typically done for an official XINS release, across various platforms and Java versions.
Also note that not all of the changes in XINS 2.2/2.3 have been incorporated (yet).

The following things are still on my list of things to be done:

  1. clean the code up further
  2. get rid of all deprecation warnings by either resolving or suppressing them (whatever is more appropriate)
  3. further changing the code to use type-safe collections where possible, using generics
  4. possibly adding Commons Lang as a dependency, so that various utility methods, like TextUtils.isEmpty(String) can be deprecated (and later removed)
  5. change HttpClient (which is deprecated) based code with HttpComponents HttpClient based code
  6. get rid of Jakarta ORO, just use the J2SE regular expression-support that is available since J2SE 1.4

If you have any changes you would like to incorporate into (this branch of) XINS, fork the project at github. Using git, it is quite easy to merge different forks.

To be continued.

 
Leave a comment

Posted by on 1 October 2009 in xins, xins3