Showing posts with label ATG. Show all posts
Showing posts with label ATG. Show all posts

Friday, 6 July 2018

Performance Monitor in Oracle Commerce (ATG)

Hi All,

Performance is considered to be the most important factor in the success of the developmental projects. In my earlier posts, I have shared my thoughts to do efficient development. If you are seeing this posts for the first I am going to share what are the steps to be followed for identifying how our code performs in the environment.

Oracle web commerce as a matured enterprise applications gives you away, you can use and find it if you are not using it there are also different tools available you can use and identify it. I am going to concentrate more into the Oracle Web Commerce Tools that is Performance Monitor.

I recommend the following steps below.

1. Find the performace of your service using the chrome developer tools,Soap UI,jprofiler and many tools avalaible in the market.
2. Identify the services that takes more time to respond.
3.start putting the Performance Monitor to the places which you suspect causing the more loopings or time consuming if you know it by guess. or else put in these places.Usually start of the method and handlers,droplets etc.

Here's how you can put it . This is the starting of the Performance Monitor . 

if (PerformanceMonitor.isEnabled()) {
PerformanceMonitor.startOperation(String pOpName, String pParameter);
}
The End of the Performance Monitor should be the same as like passing the start parameter.

if (PerformanceMonitor.isEnabled()) {
PerformanceMonitor.endOperation(String pOpName, String pParameter);
}

If you want to cancel the Operation then you can do by.

if (PerformanceMonitor.isEnabled()) {
PerformanceMonitor.cancelOperation(String pOpName, String pParameter);
}

Here pOpName is the operation with this name get listed down in the console, will see the viewing in the end part. I recomment to use the class name by the follwing way . So it will be easily identifiable.

this.getClass().getName()

Where the parameter is the any name you pass should be descriptive and menaningful. 

When you are starting the operation, it shoule be ended otherwise it will not be causing any significance in adding it . Also, you can start the operation with the multiple operations with the same arguments, you should pass unique for avoidng the collision between the operations.

After adding this promote the code to any environements and do the following .

1. enable the performance monitor

Navigate to the folowing component .

http://hostname:port/dyn/admin/atg/dynamo/admin/en/performance-monitor-config.jhtml

Here you can set the modes .

There are different modes avaliable .

1.NORMAL - track the stack of operations each thread is currently executing
2.TIME - keep statistics for how much time each operation takes
3.MEMORY - keep statistics for how much time and memory each operation takes
4.DISABLED

It will be disable by defult enable it by selecting any of the modes . Based on the type of performace you want to measure.

after enabling it to execute or invoke your service again .

Then Navigate to the dashboard or the console for the results .

You can view the results at . http://hostname:port/dyn/admin/atg/dynamo/admin/en/performance-monitor.jhtml

Here you can see with the operations name, when you click more you will get the indivituval parameters level results towards the following parameters .

Operation||Number of Executions || Average Execution Time (msec)|| Minimum Execution Time (msec) || Maximum Execution Time (msec) || Total Execution Time (msec)


With this, you can analyse which part you have to concentrate and simplify the logic and remove the lopping etc.

Happy Learning . I will try to cover the indivutuval modes in detail in the upcoming posts .

x

Wednesday, 12 July 2017

CredentialStoreManager Credentials Storage

Hi All ,
      We are going to see about the Component

/atg/dynamo/security/opss/csf/CredentialStoreManager

This class makes the calls that store and retrieve credentials from the credential store. Uses the map, key and credential properties parameters. It initiates JPS, retrieves the credential store and stores credentials in the store. Also used to delete credentials from the credential store..

When Indexing is triggered from the Dyn/admin Starting from 11.2 made mandatory to Store the Workbench Password and authenticate it before Indexing .

For Configuring the Credential you can refer my previous post here .

When you look at the above Component there is JPSConfigurationLocation is defined to it .It has the path for the jps-config.xml file . If you are pointing to the file same file created in the early stages of app creation update it with the path. If you are not pointing to it then create the Credentials again and give the same value of workbench.and save it . Once if you create it , will be stored to the {atg.dynamo.home}/security/jps-config.xml following location. so going forward it will take and from read the credentials from this location unless we are not deleting it .

In Places, where we are not installing and deploy only the Big Ear , we also need to create as a one step process . Make sure that the same location is referenced  all the time when changing the Ear. In my case the File is read from the following location.File C:\ATG\ATG11.3\home\security\jps-config.xml.

If you also face some error with the Creation of the Credential store you can refer my previous posts.

Sunday, 7 May 2017

Whats new in Oracle Commerce 11.3

Hi All,
    Oracle's new commerce release has given answer to the queries, what is the next version of Commerce, how they are going to proceed with the UpComing Platforms, what are the Features .

Yes the Newer version of the Oracle commerce Platform has been released its 11.3 , looking in to it , oracle going to be the veteran in the commerce platform. I am one among the Followers of the oracle commerce versions regularly, this time oracle has concentrated more on the Business Standards and implemented new technologies for the faster access of their Tools and industry Standards.

Oracle Commerce is also certified to run on Oracle’s public cloud infrastructure, using Compute and database cloud service. This helps commerce owner’s additional flexibility to deploy and operated oracle commerce.

We can see the Changes with respect to this version below

Installation

As per the Oracle official docs this version going to be a Major version, which means full installation is required for this version.

Oracle Commerce Platform

This version of Oracle commerce has many new changes with respect to the Rest Framework, This latest framework allows the user simplification in  interaction with the platform .It uses the Jersey as underlying implementation .It is JAXRS 2.0  compliant Framework. It gives importance for the API Versioning, locking, transitions, caching, localization, filtering , resource version tracking ,exception mapping, relation registry, self-documentation (via Swagger) and asynchronous endpoints . It allows easily adoption for the developers who don’t know Oracle commerce.

Family resemblance between Oracle Commerce and other Oracle CX applications making it simpler to code to multiple Oracle Commerce CX suite applications.  Design Pattern Based Approach for Rest Interfaces.

It is already Coming up with the some of the Rest out of box services , which allows for faster development and Extensibility.

BCC

Purge Tool is used for the purging old versions of the CA versioned repositories. It has Changes in the Memory Efficiency, when compared to the earlier versions of the Commerce Performing export of larger catalog update with lesser amount of time and lesser memory in use.  The Queries executing the versioned repositories are improved.

Many of the people have faced delay of loading the BCC in their Machines earlier, Oracle Uses the Flex and which is being replaced by the (JET) Oracle javascript Extension Toolkit. Which makes faster for the Users to access and UI is with the Industry Standards. The BCC’s Targeting and Segmentation UI, previously implemented in JavaServer Pages (JSP), has been rewritten in Oracle JET

Oracle commerce Guided Search

MDEX

All of you have wondered , why the Oracle commerce Guided Search has Difference Versions eg MDEX 6.5.2 and other components are 11.2 and so, this has been changed in this version to 11.3 Mdex also comes with the same version in this release.

It provides the enhanced TypeAhead functionality . OLT is needed to be exists in the MDEX which has been lifted and Multiple OLT can exists in the same mdex. Restful Apis has been introduced.

Experience Manager

As like BCC, the Experience Manager UI is also redesigned with the Oracle JET , which allows for the faster access  and Industry standards. New SDK with respect to the Experience Manager which allows for the Extensibility.

Earlier Versions the cartridges were developed only with the XML files , which has been replaced with the JSON. But Still users can Import their Existing XML and Convert them to the JSON based Templates, this was introduced for Better Memory optimization. Apart from these changes some new UI changes are also brought In place.

Rule manager was removed in this version and customers who are using this have to move to the Experience Manager.   


I was excited in Reading this Cool new features introduced by oracle. The detailed information about installation, configuration and migration can be seen in the upcoming Topics . Hope you enjoyed reading it . Subscribe for the newer Topics .

Saturday, 18 March 2017

Bean filtering

The Main Idea Behind this Bean Filtering is to Remove the Unwanted Attributes from the Response that was Returned. In ATG and Endeca when we take most of the Services are From OOTB one Which has its own Model Class and the Response are as it is Defined in those Classes .

This Bean Filter Services gives the Way by which we dont need to alter the Logic, instead We can Define the Attributes to be Returned or not .

The BeanFilterService filters the properties of a java bean or repository item and converts beans into a map of properties. The BeanFilterService reads XML definition files that define which properties of a Java class or repository item should be included in the filtered view of the object. The XML definitions include ways to remap property names and transform properties. 
By default, the BeanFilterService is applied to the ModelMap by the REST MVC framework before generating a JSON or XML response. However, you can filter objects at any time. 

There are two types of bean filters, 

1)repository items 

2)Java bean classes.

We are Going to See Detail about the Java Bean Classes 

How you can mention this bean filtering?  follow the following way 
 
<bean-filtering>
  <bean type="atg.userprofiling.Profile">
    <filter id="default">
      <property name="email" />
      <property name="lastName" />
      <property name="firstName" />
      <property name="dataSource" />
      <property name="homeAddress.postalCode" target="homeAddress.postalCode" />
      <property name="gender" />
      <property name="dateOfBirth" />
    </filter>
  </bean>
</bean-filtering>

From the above definition, we have defined bean Profile for which only the above properties will be  returned.  Other properties will be removed . 
 
Bean filters combine filter definitions from all classes or interfaces for an object using the filter-id property.

<bean type="atg.commerce.order.ElectronicShippingGroup>
    <filter id="summary">
      <property name="emailAddress"/>
      <property name="shippingAddress" hidden="true"/>
    </filter>
  <component>

When you define the hidden=true then that property will be removed . Once if you have defined in the above way it will be registered in the following component path 

/atg/dynamo/service/filter/bean/XmlFilterService 

This will be called on the final layer and return the properties defined .

Same like this Endeca has a contentItem bean filter which can be extended and used for filtering content item for endeca. You have to define each and every class like above to get removed .