Thursday, January 29, 2015

How to set Development Mode on JBoss 5.1

In order to acomplish this you need to edit a web.xml file located at
/server/my-server/deployers/jbossweb.deployer/web.xml
and change development init-param to be true as follows:


This will recompile the .jsp files on the fly without a need to restart the server.

It is important to mention that a production environment should not have this set to true.

Wednesday, January 28, 2015

ATG Oracle Commerce - Export and Import Deployment Topology

It might happen that you need to start a fresh installation of your BCC Sites and Agents.

When this happens you can do an export from an existing installation, this can be done with component /atg/epub/deployment/TopologyManager/ by just clicking on DownladXML on both Topology as the following image:



There are 2 Topology, one is the primary that contains the Site configuration
This is where Production and Staging Lives, along with the agents and repository mappings associated to each site.
And the Surrogate seems to be pretty similar, but it will contain the relation ship to the Database Schema if DirectSlqReplication is configured.


And to do import is very easy as well, just need to click on import From XML and import both files, and click ok.

Then Refresh the page an the site will be present along with all the agents and all the repository mappings that were added, and finally click on make changes Live,  do a full deployment (optional) and you are done





This is very useful when configuring a new environment, because the xml can be changed to point to the new Ports and host names and all the mapping will be the same.


Friday, January 23, 2015

Quick Full BCC Deployment with DirectSQLReplication

This way of doing deployment is very helpful when catalog is big, with more 100k items on it.

It will run like 80% faster than a regular Full Deployment, for a 52k Assets took it just 123 seconds.

It applies on ATG10.1.2 and newer versions.

First you need to Set Flag useDirectSQLReplication to true into /atg/epub/DeploymentServer Component

This will change the repository mappings within BCC site as follows:


Then you need to set the prefix for your data source.
The prefix is the name of you database Schema as follows:

Is very important that you append . after the schema name, otherwise you will get an exception.

And the suffix is used when your db is on a different database than PUB schema.

It is important to mention that PUB schema needs to have select, insert, update and delete privileges on cata,catb and core schemas.

So you can run the following Script to get all of them and do a clear after you have the complete list:

There are some settings that will help on the performance of this DirectSQLReplication deployment:
This can be found at http://docs.oracle.com/cd/E24152_01/Platform.10-1/ATGContentAdminProgGuide/html/s1106configuredirectsqldeployment01.html


The documentation about this can be found at http://docs.oracle.com/cd/E24152_01/Platform.10-1/ATGContentAdminProgGuide/html/s1109definethetargetsite01.htmlhttp://docs.oracle.com/cd/E24152_01/Platform.10-1/ATGContentAdminProgGuide/html/s1106configuredirectsqldeployment01.html and also apply for newer version, just make sure you visit the version you are working on.

Note: It might happen that full deployment does not work due database constraints that are not well defined, an option is disable the ones that fails to allow the full deploy to work.


Thursday, January 22, 2015

How to know if a class or resource bundle is deployed into ATG Dynamo server

Into your atg server go to the following Path /dyn/dyn/findclass.jhtml i.e. http://localhost:8180/dyn/dyn/findclass.jhtml and type the full qualified name of the class or resource bundle, and it will let you know where is that .class deployed



This is very useful to when you are facing an issue where a class your are debugging is not being reached, simply search for that and if is deployed you will know where is.



Wednesday, January 21, 2015

Oracle Import/Export .dmp selecting the Schmeas you want

Here is how you export

logged as oracle user run:
expdp schemas=SCHEMA_CATA,SCHEMA_CATB,SCHEMA_CORE,SCHEMA_PUB directory=DATA_PUMP_DIR dumpfile=MySchemas.DMP logfile=SCHEMA_expdp.log
Where:

  • schemas is the list of schemas to export
  • directory is where you want the dmp to be created, along with the log file
  • logfile the name of the log file

If just need the DDLs just add the following parameter to the above expdp command rows=n

It will ask for your system credentials.

The dmp will go to /admin/orcl/dpdump/ which is the value that DATA_PUMP_DIR, this can be changed on the DB

When is done you will see the following message:

Master table "SYSTEM"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded

Import the .dmp is very similar, just do as follows
impdp schemas=SCHEMA_CATA,SCHEMA_CATB,SCHEMA_CORE,SCHEMA_PUB directory=DATA_PUMP_DIR dumpfile=MySchemas.DMP logfile=SCHEMA_impdp.log