When I write this note, the present ATG version is 9. For couple of days, being in the comfort of home, I have been trying to create a new project in ATG9 on Windows Xp. I have just finished it successfully. So the steps are as follows.
- Extract jboss-4.2.0.GA.zip to one of your locale drives.
- Install the j2dk you require. I installed jdk1.5.0_11.
- Start the installation of ATG9.
- We need to specify the application server(jBoss) and jdk paths.
- Let the rest be the defaults.
- Finish the installation.
- Copy the license files to ATG/ATG9.0/home/localconfig
- ATG recommends using the following setting for jBoss
JAVA_OPTS=”-server -Xms2048m -Xmx3072m -XX:MaxPermSize=768m
-XX:MaxNewSize=768m -Dsun.rmi.dgc.server.gcInterval=3600000 –
- Now the DB. I hate this part. It took most of my time.
– Create the table spacecreate tablespace ts_poc logging datafile ‘C:\oraclexe\oradata\tspoc.dbf’ size 32m autoextend on next 32m maxsize 2048m extent management local;
- I chose Oracle10g as my DB.
- No adventures. Go with the Basic Installation.
- Finish the installation. It will create a sample db too.
- Now go to Start Menu -> All Programs -> Oracle – OraDb10g_home1 ->Configuration and Migration Tools . Click on the Database Configuration Assistant.
- This will help you to create a new db. No adventures again. Just give the db name(SID will be the same). Go till the last screen, which has a ‘Password Management ‘ button.
- Click on it. Give the desired passwords for the SYS and SYSTEM users and unlock the required users.
- Then finish and exit the Oracle installation.
- Start SQLPlus or some Oracle Client. I prefer sqldeveloper.(Freeware).
- Connect to the newly created DB with SYS/ with role selected as DBA.
- Our aim is to create a user for the project specific use. For this purpose we need to create a new tablespace. The following sql script will create the tablespace named ts_poc.
- Now we can create a user in this table space for our project. sql is as follows
- Grant DBA role to the newly created user
- Now we can disconnect the SYSTEM user and connect using the newly created user(learn1).
- Here we need to create tables required for our new project. Since our project is based on ATG, we need the tables that ATG uses. ATG uses mainly four modules – DAS, DPS, DSS and DCS. We need to put all the tables these modules use. The DDLs are provided with ATG. We can find them in sql\install\folder of each Module. For example, in the case of DCS and our Oracle, we have to execute the following script.ATG\ATG9.0\DCS\sql\install\oracle\dcs_ddl.sql.
- We need to execute them in exactly following order – DAS, DPS, DSS and DCS. Otherwise we will get some errors. Some of the tables in these modules are inter related.
- So at last we are done with DB part. Now we have most of the tables as empty.
- Optionally, you can change the port number of the oracle if needed as it collides with the default jboss http port.
–Create the usercreate user learn1 identified by learn1 default tablespace ts_poc;
— Grand DBA permissiongrant dba to learn1;
— change HTTP port from 8080 to 8083
call dbms_xdb.cfg_update(updateXML(dbms_xdb.cfg_get(), ‘/xdbconfig/sysconfig/protocolconfig/httpconfig/http-port/text()’, 8083));
— change FTP port from 2100 to 2111
call dbms_xdb.cfg_update(updateXML( dbms_xdb.cfg_get(), ‘/xdbconfig/sysconfig/protocolconfig/ftpconfig/ftp-port/text()’ , 2111));
— refresh settings
- So the tough db part is over. Now we need to make the application up. ATG used to come with their own server called DAS(Dynamo Application Server). But nowadays they have stopped them and also support for it is also closed. Now they are promoting jBoss. Even though they support IBM websphere, they don’t want to promote it as they also have some product similar to ATG.
- During the ATG installation, it creates a new server called “atg” in jboss server folder. This is nothing but a folder with name ‘atg’ with a number of files and folders. We are going to create a new server. It is very simple. Just create one more folder say ‘learning’. Copy all the contents from ‘atg’ folder to the newly created folder. We are going to deploy our project to this folder.
- Now we need something to work on. Eclipse. Download it. There are so many plugins provided by ATG to make life easier.
- For easy to use, I have created an eclipse project, you can download it and import it to Eclipse after extracting it. Download it here.
- Check for the META_INF, build.properties, build.xml and username.properties for configuration things.
- It involves a bit of configuration. Change the name by searching for it. Change the server name. Change the context root etc. (dynamoJ2EESpecifier.xml)
- Set the required environment variables – DYNAMO_HOME, JBOSS_HOME and JAVA_HOME.
- Build the application. The build creates a new module and then creates a .ear and .war files in the jboss server directory specified.
- Copy the jboss\server\learning\atg-oracle-ds.xml to \server\deploy folder. This is used for the connection to the database. Edit this file to change the db details. This is referred in JTDataSource.properties. Also copy the jdbc jar file to lib folder.
- Now we can start the new application. We need to start the jboss with the sew server we created. In our case that will be run -c . Check for the server successful start up(We can use ATGLogColorizer.exe to make the errors bloody ). Most common errors are regarding the db issues. If you find them modify the atg-oracle-ds.xml.
- Done, access the web page using http://localhost:8080/. I have put an index file which will show up.http://localhost:8080/dyn/admin will take you to ATG admin pages (Credentials: admin/admin)
Should you have questions regarding any aspects of this, please feel free to contact me.