atg locked caching - how locked caching works with atg repositories

Suggested use : when data changed frequently.
Disadvantage  : can lead to deadlocks.

<item-descriptor name="..." cache-mode="locked">

Locked caching is based on write locks and read locks.If no servers have a write lock for an item,any number of servers may have a read lock on that item.When a server requests a write lock,all other servers are instructed to release their read locks.Once an item is write locked,no other servers may get a read lock or write lock until the first server releases its write lock.In other words,once a server has a write lock on an item,all access to that item is blocked until the write is completed.

A server requests a read lock the first time it tries to access an item.Once the server has a read lock on the item,it holds that read lock until the lock manager notifies the server to release its read lock.At that time ,it drops the item from its cache.

A write lock is requested whenever a server calls getItemForUpdate(),or the first time setPropertyValue() is called,and released at the end of the transaction.

ATG Full Deployment Vs Incremental Deployment

Full Deployment

Full deployment can be useful in the case when the assets on the target sites are modified manually or are corrupted.

Target site might become inconsistent if a failure occurs during rollback,doing a full deployment,the previous set of assets created by different projects will become the  active assets of target site.

Always gives the fresh latest version data to the target

It can be time consuming as the all target data first purged then deployed again with previously deployed projects. It consumes number of resources on the target.

Incremental Deployment

It’s useful in the case when the assets which are deployed to the target are less in number after the first deployment.

Whenever you have a need to rollback to the previous completed project then the incremental deployment is preferred to do because the full deployment will try to delete the all data from the target which can not be restored again.

1. Faster than full deployment since only the assets in the project are being purged first and then deployed.
In case of multiple deployments in a day, Incremental deployment is preferred.

No drawback. Once the data is imported to the target, the deployment happens incrementally.

NIIT National Chess Championship Rules and Regulations

 1. Any 4 players can play in each round of Team Championship.However, all   
   6 players are eligible to take part in the Individual Round. 
2. Team can be formed with both Male & Female members. 
3. Those players who are within the first 20 ranking of the 
   Individual Championship will be eligible to play against 
   Anand. They will be allowed to bring in 2 more players from
   his/her organisation to assist him/her. These 2 additional 

   players    should be from HR & Top Management, preferably. 
   These 2 additional players cannot be from the original playing 
4. All Playing Conditions, Rules & Regulations will be decided by  
   State Chess Association(In Bangalore -> United Karnataka Chess 
   Association (R)) as per the International Playing terms& conditions. 
5. The Winning Team of Team Championship will get a direct entry 
   into 2012/13 National Team Championship. 
6. The Winner of Individual Championship will get a direct entry 
   in to 2012/13 National B Championship for Individuals. 
7. The Championship shall be played under the laws of "Chess and
   FIDE Swiss Rules”. Totally Seven rounds shall be played    

   unless otherwise decided by the Championship committee before 
   the commencement of the Championship.
8. Team Championship: Each Team consists of 6 players out of 
   which any 4 appointed by the team captain will play each 
9. Individual Championship
   Div. I: For Rated players. Unrated players can also opt to 
   play if they desire.
   Div. II: For Unrated players only.
10. The time control will be 
   A. 45 minutes for each player for Team Rounds
   B. 30 minutes for Individual Rounds. 
   However, the Championship committee has the right to change 
   the above timings or the number of rounds before the    
   commencement of the first round.

Participation fee:

a. Rs 12,000 for each corporate team (6 players for both  
   individual and team events)
b. Rs 4,000 for individual entries. 


Total Cash & Trophies worth nearly Rs. 2.00 lakhs will be awarded to the three highest placed teams in the Team Championship, three highest placed individuals in the Individual Championship Div I & II respectively, Top Board Prize, 2nd.Board, 3rd. Board, 4th. Board for Team Championship & Most Promising Women Player of the Championship.

hitRatio missRatio and usedratio in repository caching

The missRatio indicates that the items in cache are not used or missed. That is your queries are returning totally different rows of data everytime and hence having a chance for them is useless. Look for a high missRatio and disable cache for these items.

Same way if the missRatio is too low or the hitRatio is too high something like 90-95%, that means that we have almost all the data in the cache itself. This indicates that either our cache size is too big or the data in the table is not in large numbers.

The usedRatio indicates the percent of the maximum cache size now in use. If this is too high, that means that most items in the cache are being used now. So we can increase the cache size.

The usedRatio is the percent of  entryCount/cache size.  gives the number of entries currently in the cache. If this is same as your cache size consider increasing the cache size.

google search results showing wrong posts

I primarily write blogs on atg topics and some general topics which i think will help others,one fine day i noticed few of my posts are not displaying correctly in google search results,while given a search criteria i am seeing  different posts of mine displaying in the search results whereas my actual post for that search criteria is not shown,due to this some of our new visitors may leave the site.This is a painful situation and we are helpless since google has its own algorithm for displaying and filtering search results,to correct this  we can do some research on what went wrong and modify accordingly which is a permanent solution but time consuming.But most of the time we will leave this to google trusting it will correct this automatically.

Instead you can  try some of the options below,which is not only a workaround but will make your site highly navigational and user friendly

The first thought is how quickly we can redirect users back to actual posts he is looking for,once he click the incorrect posts from google search results?

Option-1 is to add a 'Recent Posts','Popular Posts' and 'Recent Comments' widgets in your blog,so that chances are there user might find the information he is looking for from these widgets which will eventually make him stay at your site.

Option-2 is to add a google search tool bar to your blog,which has options to search the blog posts,search in web etc.This helps the user to quickly search the post and get the required data.

Option-3 is to add a blog archive,user can easily navigate this archive to find the necessary posts/data.One common thing noticed while creating an archive is most of  us make an archive option set to daily archiving which makes navigation difficult for the user.In this case user has to do several clicks inorder to expand the archive and get his necessary information which is not user friendly.Modify the option to monthly if not,so that he can easily navigate your blog archive and find the information he is looking for. 

Adding  a good sitemap and categorizing your posts will also helps and make your site more user friendly.

Alternately you can investigate what went wrong and take the corrective measures.

Feel free to Add if you know other alternatives !!!!

Logging without Extending GenericService

ATG has a built in logging mechanism provided by the class atg.nucleus.GenericService,the logging can be done through the methods logDebug(),logInfo() etc.Most of the frame work/Out Of the Box classes like DynamoServlet,GenericFormHandler,CartModifierFormHandler etc are extending the Generic Service class.

But if you are writing a component class which cannot extend GenericService in its hierarchy,we need to do a small tweak like below.

Create a component from the Out Of Box class 'atg.nuceus.logging.ApplicationLoggingImpl'.

# /com/test/TestLogger
#Thu Jul 12 21:22:19 GMT+05:30 2012

Now create your own component class.Inject the logger into these POJO classes.

package test;
import atg.nucleus.Nucleus;
import atg.nucleus.logging.ApplicationLoggingImpl;

public class Testbean {

private ApplicationLoggingImpl logger;

public ApplicationLoggingImpl getLogger() {

return logger; }

public void setLogger(ApplicationLoggingImpl logger) {

this.logger = logger;

// the identifier will enable the logger to know which component has
// given the log message. otherwise it will tell unknown service as the //component name 



Inject the logger into your Testbean component.

# /com/test/Testbean
#Thu Jul 12 21:22:19 GMT+05:30 2012


Now you can use  logger inside the class in normal fashion.


logger.logDebug("inside XXX method");

Now if we wish to change the log level, we need to go to the ACC or adminUI, and locate the TestLogger component and change its appropriate properties.

See Also

Blog increase space between two widgets

html widgets without spacing

I have modified blog template  from three column to four column by adding one more sidebar.So now i can add more information  and ads to my blog,but unfortunately there is no widget/gadget spacing in the sidebar i added recently and as a result the ads added in these widgets are displaying very close to each other,not in a user friendly manner, like the screen shot above.

I have added a small modifications inside the widget code.its nothing but adding a 'br' tag inside your HTML widget as shown below.Only thing you need to take care is to add this line below your ad code or in a seperate widget altogether and place that widget in between any two widgets.

adding br tag to html widget

This tag will add two line breaks between the widgets. See the screen shot below.
displaying widgets with increased spacing

Also see

Blogger option to delete images from Picasa Albums

Normally during blogging  you upload lot of images,but have 
you ever noticed where this images are getting stored,its getting stored in the picasa web albums.Similiarly while deleting posts whether will the images are removed automatically ? No ,How can it be removed from the picasa
web albums?

When you delete a post,you will be shown a confirmation  page with the option 'Are you sure want to delete the Post?',then the entire post and below it will display all the images you uploaded with that post,if any , with a checkbox corresponding to each of it.You can select the checkbox to delete the images permanently from the picasa web albums.

Another thing is when people want to remove one blog,they delete the entire blog one shot,but this will not remove the images from the picasa web albums.So if you are sure you dont want the images any more,better options is go to your individual posts and follow the above steps to delete images.I prefer this way than going to picasa and delete the images,because this will make sure you are not deleting any required images and will have more control of your actions.Once you remove all the images from your posts,go and delete your blog.
blog option to delete image in post

Initialize target environment and edit workflow to specify target

Click the Make changes live button on the deployment administration configuration screen.

In the New Site Initialization Options screen, leave Do a full deployment selected and click Make changes live.

To follow the progress of the deployment, click Overview and open the Production site. Once the deployment is done, click back to deployment overview.

Once the initialization process is done, you should see the following in the Deployment Overview screen:

Edit workflows to specify Target

Log on to URL: http:localhost:8180/dyn/admin.

Click on ADMIN ACC and Start ACC in server VM.

In ACC, select Workflow, publishing. Open and modify workflows under Commerce,Content Administration and Personalization folders.

Select Target site in all the places where it is displaying in Red color.

Manually Configure Deployment in CA Server

In BCC Home page click Content Administration - > Admin Console,this will take you to Deployment Administration page.

Click Configuration link in the left column under 'Deployment Administration'.

Set up the Production Environment.

Click on the Add site link and Enter the following information.
Add site information in BCC

Scroll down further to the Setting Repository Mappings area.

Select /atg/commerce/catalog/ProductCatalog as the source repository and /atg/commerce/catalog/ProductCatalog_production
as the destination repository.

It should look like the image below. Click the Add button.

Repository Mapping Section

Repeat the same step above for mapping other repositories 
like ClaimableRepository, PersonalizationRepository, and SecurePriceLists(mapped to PriceLists_production) and yourRepository component.

Click Save changes.

Click on the Agents tab, pictured below.

Click on the Add agent to site link. Enter the following information

Agent name: prod

Transport URL: rmi://localhost:8160/atg/epub/AgentTransport

Include file systems: /atg/epub/file/ConfigFileSystem

Note: To determine the correct RMI port, you can refer to that ATG server’s /atg/dynamo/ file.

Click Save changes when you are done.

Click the back to deployment administration configuration link.

Agent details in BCC

Deployment topology xml file

Deployment topology can be defined in 2 ways: manually creating using BCC or using the deploymentTopology.xml. 

Deployment topology file can be located in the path - <atgxxxdir>/Publishing/base/src/config/atg/epub/deploymentTopology.xml

As described earlier, the structure of the deployment topology contains the target sites, Publishing agents and source – destination repository mapping.

Please find below the reference for deployment topology file for a staging and production instance.

<? Xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE publishing-deployment-topology SYSTEM

<target> <target-name> Production </target-name>
<description> Production , full deployment </description>
<target-deploy-type> WORKFLOW </target-deploy-type>
<agent> <agent-name> PublishProdAgent </agent-name>
<principal-asset> REPOSITORY</principal-asset>
<transport> <transport-type> RMI </transport-type>
repository>/atg/commerce/catalog/ProductCatalog </source- 
repository>/atg/commerce/priceLists/PriceLists </source-
<destination-repository atg/commerce/priceLists/PriceLists 
_production </destination-repository>
</repository-mapping> </target>
<target> <target-name> Staging </target-name>
<description> Staging, full deployment </description>
<target-deploy-type> WORKFLOW </target-deploy-type>
<agent> <agent-name> Publish StagAgent </agent-name>
<principal-asset> REPOSITORY</principal-asset>
<transport> <transport-type> RMI </transport-type>
repository>/atg/commerce/catalog/ProductCatalog </source-
repository>/atg/commerce/priceLists/PriceLists </source-
<destination-repository atg/commerce/priceLists/PriceLists 
_staging </destination-repository>
</repository-mapping> </target>

Once the file is ready go to the Deployment 
Administration page,click configuration and choose
the option click Import from XML.See Screen shot below

See also how to manually configure deployment in the CA Server.

import from xml option in bcc

Nested Servlet Beans and Referencing Parameters

Because a servlet bean's parameters have scope only within the bean itself, when you nest one servlet bean inside another, the outer servlet bean is not affected by the parameter values in the inner servlet bean. However, it is possible for the inner bean to access the values of the outer bean's parameters by prepending two dots (..) to the parameter names to distinguish them from the inner bean's parameters of the same name.

Suppose, in the previous example, you wanted to display both the product's name and corresponding skus from the inner ForEach. You could do something like this:

<droplet bean="/atg/dynamo/droplet/ForEach">
  <param name="array" VALUE="/myBean.products">
    <oparam name="output">   
       <droplet bean="/atg/dynamo/droplet/ForEach">
       <param name="array" VALUE="param:element.skus">
       <oparam name="output">
        <p> <valueof param=""></valueof>   
         has the  SKUs
         <valueof param ="element"></valueof>.    

In the first VALUEOF tag, ..element refers to the element parameter of the outer ForEach. In the second VALUEOF tag, element refers to the element parameter of the inner ForEach. The resulting HTML is:

<p>Samsung Galaxy  has the SKUS Samsung Galaxy B7510 .
<p>Samsung Galaxy  has the SKUS Samsung Galaxy pop s5570
<p>Samsung Galaxy  has the SKUS Samsung Galaxy pop i559

<p>Nokia has the SKUS Nokia Lumia 800 
<p>Nokia has the SKUS Nokia X2 
<p>Nokia has the SKUS Nokia C5 

You can use this dot notation with multiple levels of nesting. 
Parameters preceded by two dots refer to the servlet bean one level up; parameters preceded by three dots refer to the servlet bean two levels up; and so on. You can also use a single dot to refer to a parameter at the current level, but this is not necessary.

Another approach is to use the setvalue tag to define another parameter in the outer servlet bean, and set it to the value of the parameter you want to refer to from within the inner servlet bean. The following example uses this approach, and produces that same results as the example above.See the screen shot below.

Referencing parameter in nested servlet bean

Bidvertiser Issue Showing No Revenue Initially

I have seen many feedbacks about Bidvertiser Ad network,so thought of sharing my own experience.Find below the discussion thread with Bidvertiser team.Feel free to share your views if its genuine.

My Question
Hi Bidvertiser Team,

I am quite new to bidvertiser,recently i published my blog with Bidvertiser,my blog is about discussing issues and solution maninly ATG Commerce developers and few general topics,i am able to derive a decent traffic to my blog and currently i am seeing xxxx impressions and x Click Points,but my revenue and pending balance is shown as 0$,is there anything i am missing or its the usual behaviour and will take some time to get the updated status,highly appreciate your response.

Response from Bidvertiser Team
Dear Sebastian ,

Clicks and conversion bonus our now joined together to form Click Points, this is what you see displayed in your account, not clicks. Conversion revenue is a potentially additional revenue depending on the quality of traffic that you are sending through the advertisements.

In cases where there is only a small amount of traffic and clicks, it is possible that little or no revenue is earned. However as you increase the traffic quantity and quality a significant increase in revenue will be seen.

Best Regards,
BidVertiser Support Team.

Follow Up Question
Still not seeing any improvement in revenue.

Response from Bidvertiser Team
Dear Sebastian ,

Some of our ads provided have very low minimum bids, and work on a conversion basis. If the visitor converts into a lead or sale, then a large amount of revenue is paid to the publisher. We obviously also have more regular ads that pay on a ppc basis, and a mixes of both of these.

Follow Up Question
Thanks for the update,need to know is there a way we can choose the regular ads that pay on a ppc basis,In some Forums i saw Bidvertiser has an option to filter out ads based on the bid amount,is it possible ?

Response from Bidvertiser Team
Dear Sebastian ,

It sounds as though that was an old post. The option to manually filter which ads are shown has not been available for some time now.

         Issue in displaying Ads side by side
                  Blog option to delete images 

Luminate Issues Not displaying Ads in Images

Luminate Ads are not displaying on my posts,Given below my discussion thread with Luminate Team.

My Question
Hi Luminate team, I am quite new to Luminate,recently i published my blog with Luminate,my blog is primarily targeted to ATG Commerce developers to solve their day to day issues during development and few general topics,currently i am getting a traffic of around 100-200 daily pageviews,but my revenue is shown as 0$,My Current reports says i have 181 image views and i am not seeing the luminate icon or any other ads coming on my images,i can see only the luminate icon when i put my image and publish my post for sometiem,but after that it disappears,is there anything i am missing or its the usual behaviour and will take some time to get the images start working,or is it region specific ?
highly appreciate your response.

Response from Luminate team

I am seeing the icons and adds here: and see attached screenshot. Are you not seeing the same? 
Image screen shot below.
luminate icon displaying

Follow up Question
Hello Luminate team,
Many thanks for your response,however i cannot see the luminate icon in the same image,any region specific settigns is there,i have attached the screen shot taken this morning(09:50 AM Indian time),it does not have the icon, similiarly for my other images i cant see the icon. Aprreciate your response. Image screen shot below.
luminate icon not displaying

Response from Luminate team
The only geo specific thing is the ad, it may not appear in all geos. However the sharing icons should appear for you. Let me enquire internally why this may be.

Follow up Question
I have uploaded one more image on 24th June,this is of a Shopping cart - 'Add to Cart'  option ,with dimension  (235*215),while previewing my post i am able to see the luminate icon and the overlay ads,but after publishing my post,neither i can see the luminate icon nor the more similiar issue. Image screen shot below.

Post URL - >

shopping cart without luminate icon

Response from Luminate team
I am seeing the apps and the ad
in this image. Are you sure you don't have ad block on in your browser, sometimes that interferes. See the attachment, I am seeing below.

Also see Bidvertiser Revenue not showing up

         Issue in displaying Ads side by side
         Blog option to delete images

shopping  cart with luminate ad and icon

atg configure promotion for a Product/Sku - item discount percent off

This is the continuation of the post configuring pricelist.

Before starting your development with Promotion please note the point,
Promotion rules are cached for efficiency,as a developer who edit rules frequently,you should not turn off the caching mechanism.To do so,set the maximumCacheSize and maximumCacheEntries properties of the atg/commerce/pricing/PMDLcache component to 0.

Now go to ACC Pricing go to Promotion,Create a new promotion of type 'Item Discount - Percent Off'
ACC item discount percent off

Now create a PMDL Rule,this is to specify the condition of the discount.
PMDL for product black berry

Now set few properties according to your requirements.My values just for  reference.

Automatically apply to all Orders - Global Promotion,make it true or false appropriately.Value - >false.
Discount Percentage - give an integer value as your percentage of Discount for that item.Value -> 5.
Give to a customer more than once - Number of times per user Promotion can be given.Value -> true

Once your Promotion has set then create a scenario to deliver this Promotion to targeted users.

The scenario's action specify who is eligible to receive promotion.
Once the customer receives the promotion,the promotion rule then determines if the customer qualifies to receive the promotion's discount.

Since for this example we are simply targeting only one user.So our scenario will look something like below.
scenario item viewed

Once the scenario is enabled,login to your application with the login name (i have created a user atguser)navigate to the product details page,select product Black Berry,you can see the price as 11 Euro now,proceed with checkout where you will see the promotion is applied to that product and the discounted price is displayed,since we had given 5% as item discount ,the actual price now is 11-.55 = 10.45 Euro.

Now logout and simply browse through your catalog and select the same product and proceed to checkout and you can see the price is shown as 11 Euro without any discount.

checkout page with promotion applied

This is the continuation of the post configuring pricelist.
Also see the posts on internal working of promotions and pricing engine.

Pricelists in ATG - Basic Configurations

Price Lists are created for sites when a contract lists specific pricing that is not promotional pricing or conditional pricing.

In ACC open the tab Pricing and then click on Price Lists.

You will need to check first to insure that a price list hasn’t already been created for your site.

If no folder exists, create new price list folder by first selecting the folder you want your new price list to be placed into and then clicking on the icon at the top right of the screen to create the folder.

When you have the folder selected click on the new folder you have created and then click on New Price List.Type in the Name.

Base price field is optional.

Select the End date and set it as a future date.Click OK.

Now you can set/modify the price for the items you need.

Search for the product: items of type Product whose Name contains (ignore case) name item you want to change.

Enter a new price for the item.SAVE.Click OK.

Now you will have to test your site to insure that the Price list is working correctly.

Basic Configuration

Create a priceList Folder and PriceLists(Sale Prices and List Price minimum),after that set prices for Skus and Products,basically create the list prices and sale prices in Price item of Price Lists Repository ,The Price Lists prices are derived from this,you can also override this,If the sale Price is less than the list price,Application displays the Sale Price and List price to the Customer with List price striked.Customer will be charged for the sale price only.

Implement in your application

Call the PriceDroplet twice
, once for the standard prices and a second time for the sale prices.standard prices is the property configured in the profile->Profile.priceList.
Call PriceRangeDroplet which calculates the lowest and highest prices from the inputs.

Compare the values returned from 
PriceRangeDroplet during the two calls,If they differ, it means that the sale price list returned a lower value than the standard price list, in that case, the sale price range should be rendered along with the standard price range.See the screen shot below.
Also see how to configure Promotions here
 displays sale price and list price in application

issue in display ads side by side in blogs

I hope you know how to place two ads side by side,its pretty simple.Add two div tags,with float property of each set to right,left and margin pixel as 1px,see the screen shots below.Well this works if there is no content below the ads.

configurations for displaying ads side by side

If we plan to place ads side by side above your content,and if there is enough space between the two ads,content might overlap,it will automatically fit in between the ads.

ads with content overlap

you can do some tweaks for this .Increase the margin pixel size of your container which holds the ads which will eventually reduce the extra space between  ads.

I modified the margin pixel size of the second container .See the modifications below.

<div style='float:left; Margin: 1px;'>
Your Ad Code

<div style='float:left; Margin: 40px;'>
Your Ad Code

Now my ads are happily displaying side by side without any overlapping content !!!. 

Also see the posts

no overlapping content between ads 

Related Posts Plugin for WordPress, Blogger...