Configure Template Email Sender for Managed Weblogic Server

This is how i done the configuration for my local box.

My Admin Server as usual is running in the Weblogic default port 7001.To deploy another EAR,I have created a Managed Server running in port 7002.

My application hosted in the Managed Server got hanged when i try to send email through template email sender.

Fix

After modifying the component Configuration.properties  i was able to do that.

Add the properties siteHttpServerPort and adminPort in
<ATG-Home>/servers/managed-webLogicServer/localconfig/atg/dynamo/Configuration.p
roperties and
set it to your Managed Server Ports.


siteHttpServerPort=7002
adminPort=7002


If  you use CIM configuration  for creating Managed Server,CIM will automatically create this entries in the component, otherwise you need to modify it manually.The above properties are required to send out email through template email sender using template jsp. 

Also set the below properties in SMTPEmail component which is required anyways

Set the emailHandlerHostName - localhost ( Your Host Name)
emailHandlerport - 25

waitForConnectionMillis=30000 (<ATG10xxxdir>/home/localconfig/SMTPEmail.properties file)
 

solution for removing duplicate title tag in your blog

I have resolved the issue of duplicate title tags,In my case,I have made 10 different titles but all starting with the same wordings initially (as it addresses same topic different issues)and a difference in the latter part.

After analysing the title,i came to know, the blog by default creates the title from the initial part of wordings,also based on that it creates an html file for your post .

I have rearranged my titles so that the later part which has the real meaningful difference in wordings will come first,by doing this way had created unique  titles and the corresponding html files for me.Others please find some suitable unique titles
and modify accordingly.

Once you have addressed this issue,within 2-3 weeks all the errors which were previously showing in Webmaster Tools,Diagnostic section->HTML Suggestions had gone !! it looks clean now.

Also keep a periodic check to your Webmaster Tools and its appropriate/advisable to take corrective actions for these simple issues,which i am sure will definitely help you in long run.



Also see issue in displaying ads side by side
Blog option to delete images
Luminate Issue
Bidvertiser Issue
Bad Vehicle Servicing my experience
Gas Transfer formalities
AAdhar UID Enrollment Steps

Hot Swap Java Classes - Hot Deploy ATG Application with Weblogic

I saw a lot of  information regarding this topic which is either cluttered or confusing to the readers,i tried this,a very useful feature and a must have for every developers,this is quite easy to
configure with minimal modifications.

Visit the link to see the Pre-Requisites and how hotswap works in Java Application

Hot Deploy Java Application

Now its time for hot deploying your classes in ATG Apllications which is deployed in some Application Servers,believe me its really simple,fast and saves a hell lot of time !!!,
you can modify your classes straight away but do keep in mind to launch the debgugger before doing so,Run the runAssembler as well(This can be invoked from a build script,probably an Ant Build with “fork = yes”,so that it will run in a seperate JVM),
after this  you can see your class changes will be reflected without needing a Server restart

Hot deploy Pre Requisites – Easiest way to hotdeploy your code – Hot switch your java classes

Pre Requisites

This can be possible if  the version of JVM is V1.4 or higher.In Eclipse Set up your remote debugging options.

please visit the link to see how can you setup this,
Set up Remote Debug

Also From the Eclipse Project menu,check 'Build Automatically' Option.Set  break points to the class you need to modify(will make sense if you keep the debug point before the line you want to modify),after that Launch the debugger.

Hot Deploy Java Application


Generally you compile the code with the options ‘Run  as a Java Application’ or through some ant script which will do a clean, build and deploy your whole code.which is time consuming.


Hot Deploy,Modify your code straight away unless it's a change in method signature,save your changes,Relaunch the  debugger with the same class(in case any issues with automatic build )and you will notice your changes are reflected without compilation.

Also verify how to Hot Swap classes in ATG Applications running in Weblogic Server

Download Rent Receipt free of cost - HRA Format download

As March 2012 is nearing,Its high time to update your tax declarations and submit the necessary proofs to support your declarations.As you know HRA is an integral part of your tax declarations,For Showing HRA proofs,many people buy receipt book from nearby  stationary shop or so,but atleast for IT industry,you dont require any receipt book,but a Receipt Format created in Word or PDF will do the job for you instead.So its good to have this doc handy  with you,so that with a minimal modification
you can  show the proof for the coming years as well without shelling out a single penny,as your company bears your print out costs obviously :) ... 

You can leave your email id in the comments section,i will send you the format !!!


See Also


Gas Transfer Formalities
Aadhar UID Enrollment 
Efiling Acknowledgement

ATG 9.1 Required JARS - ATG JARS

Assuming you have installed ATG in the folder C:/ATG/ATG9.1.Below are the
mandatory jar files you require.
 
/DSS/lib/classes.jar
/DAS/lib/classes.jar
/DAS/lib/ice.jar
/DAS/lib/resources.jar
/DAS-UI/lib/uiclasses.jar
/DCS/lib/classes.jar
/DCS/lib/resources.jar
/DPS/lib/classes.jar
/DSS/lib/resources.jar
/DAS/lib/servlet.jar
/B2BCommerce/lib/classes.jar
/Publishing/base/lib/classes.jar
/DCS-UI9.1/DCS-UI/management/lib/classes.jar
/PublishingAgent/base/lib/agent.jar
/PublishingAgent/base/lib/classes.jar

For configuring this in Eclipse add a User library(ATG),in the Build
Path and add all these Jar files to that.

Java StringBuilder to concatenate strings - Sample Code

Concatenation of string using “+” operator can be seen very common in sysout,logDebug statements.This will have an impact on the performance. it should be avoided to improve the performance.instead you can use StringBuilder.append().This will really improve the efficiency of CPU utilization by 2.3 times compare with concatenation of string using “+”operator.

Please find the usage below

System.out.println("request params :"
                    + " contextPath=" + pRequest.getContextPath()
                    + ", " + PATH_Info + "=" + pathInfo
                    + ", " + BASIC_AUTH + "=" + basicAuth
                    + ", " + FORM_AUTH + "=" + formAuth
                    + ", " + FORCE_LOCALE_PARAM + "=" + forceLocale
                    );

The above concatenation can be achieved as given below,

String [] stringConcatArray  = {"request params :"," contextPath=",pRequest.getContextPath),PATH_Info,"=",pathInfo,BASIC_AUTH,"=",basicAuth,FORM_AUTH,"=",formAuth,
FORCE_LOCALE_PARAM,"=",forceLocale};

System.out.println(stringConcat(stringConcatArray));

Add below method in your StringUtil Class.Any number of string arguments can be passed to this method to get it concatenated to one string.

public static String stringConcat(String args[]) {
  StringBuilder builder = new StringBuilder();
  for (String strVal : args)
   builder.append(strVal);
  return builder.toString();
 }

ATGDustCase for a Droplet - Sample Code

The code given is pretty much focussed on basics,it
certainly helps to execute/pass your first ATG Dust
Case.Customise this class as you wish to suit your requirements,
dont forget to add your own package  name,service method etc here.

Below is the AtgDustCase for a Droplet named AcessServlet.
I am not providing the code for AccessServlet but for the test class.

package *.*.*.*;
import java.io.File;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import javax.servlet.ServletException;
import atg.servlet.DynamoHttpServletRequest;
import atg.servlet.DynamoHttpServletResponse;
import atg.servlet.ServletTestUtils;
import atg.test.AtgDustCase;
public class AcessServletTest extends AtgDustCase {
        private ServletTestUtils mServletTestUtils = null;
        private AcessServlet obj;
        protected void setUp() throws Exception {
        super.setUp();
        if (mServletTestUtils == null)
            mServletTestUtils = new ServletTestUtils();
                assertNotNull(mServletTestUtils);
        File configpath = new File
         ("C:\\workspace\\myModule\\config");
        assertNotNull(configpath);
        setConfigurationLocation(configpath.getAbsolutePath());
        obj = (AcessServlet) resolveNucleusComponent
        (("/atg/userprofiling/AcessServlet "));
        assertNotNull(obj);
       
    }
    protected void tearDown() throws Exception {
        assertNotNull("tearDown");
        super.tearDown();
    }
    public void testAgent() throws ServletException, IOException {
        int bufferSize = 128 * 1024;
        Map<String, String> params = new HashMap<String, String>();
        DynamoHttpServletRequest request = mServletTestUtils.
        createDynamoHttpServletRequest(params,  
        bufferSize, "GET");
        DynamoHttpServletResponse response = mServletTestUtils.
        createDynamoHttpServletResponse();
        //obj.service(request, response); //
         ............  //Here you can add Oparams and Response
         related validations
         ..............
    }
}
Add Assert statements appropriately to justify your test cases.
From the IDE(Eclipse)Right Click the file Run As Junit Test !!!

See basic steps to execute ATGDustCase for a FormHandler

ATG Dust Jar - ATGDustCase Jar's

Assumption is you are working on ATG Platform and have all the necesary JAR's and user libraries to run  applications on this Platform.Now you are going to write your first ATG test case and for that you need to add appropriate Jar files and modify your classpath settings so that it will include your recently added jars.

Now the JAR's required by you to run the ATGDustCase shown below
You also need to set the below JAR files in your classpath.


atg dust jars








See how can you add these JAR's to the classpath in Eclipse.

See basic steps required to execute ATGDustCase -> ATGDustCase Steps

Unit Testing ATG Classes Your First ATGDustCase

1. Make sure you have all the required Jar Files to execute ATG
   Dust.
2. Your  test class must  extend the class ATGDustCase
   (package ->atg.dust.ATGDustCase).eg:
   package x.x.x.x;(->package structure where your test class
   resides)
             import atg.test.AtgDustCase;
             public class FirstATGDustCaseTest extends AtgDustCase {
            }

3. Override the two methods setup() and tearDown() in your test
   class.
    eg:    protected void setUp() throws Exception {
             }

            protected void tearDown() throws Exception {
             }

4. You have to write minimum one test method and it must prefix the
   word 'test'(eg: actual method ->Agent(),test method->testAgent
   ()).

See basic steps to execute ATGDustCase for a Droplet

SVN Best Practices - Basic/Essential SVN things developer must know

Synchronize your code base

Consider synchronize your code base as the first task towards your development activity.

1.   Synchronize all the modules,
2.   Accept all incoming changes and
3.   Merge all the conflicts,if any.

This makes your code base in sync with the actual code base.

Check -in/Commit

Once you have completed one file/functionality,repeat the above steps from 1-3.Now  open  synchronize perspective from Eclipse
you will see only your outgoing changes.You have to build all the modules now,This will make sure the whole activity has  not created build breaks.If no build errors!!!  go ahead and Commit.

1. You can select all the files and select commit in one go
    but  doing so will allow one common comment
    to all the  files.
2. You can commit file one by one. In this case you can enter a
   comment for each  file.But working in larger projects,this might
   create build errors,
if we have to commit lot of files and
   meanwhile other person start synchronisation his code base.

display your custom module in the ATG Control Center(ACC)

You can display your custom modules in the components section of ATG Control Center,with minor configuration changes,following are the elements you need to add to your modules.

Config.properties -  Create this file in your modules config directory.(Fullfillment/config/)This files labels and configures a configuration layer in the ATG Control Center(ACC).

Module component – Create a Nucleus component(eg:Fullfillment.properties) of the class atg.service.modules.Module inside /config/atg/modules/.Give your module name(Fullfillment) as a value for the moduleName attribute.

The properties file is listed below
$class=atg.service.modules.Module
moduleName=Fullfillment

Module Manager - Add your modules name to the modules property of the atg/modules/ModuleManager component.

Create a ModuleManager.properties file in your module's
/config/atg/modules directory with the following property :
modules+=Fullfillment

This adds the Fullfillment component to the modules list of the ModuleManager.Open your ATG Control Center to see your module listed in the ACC's list of modules.

Displaying Module in ACC

Repository Cache modes - item descriptor inheritance

ATG Repository Cache modes

There are four  types of cache modes

Disabled – No caching
Simple – Simple Caching - Default mode
Locked – Locked caching
Distributed – Distributed caching

We  can specify cache mode for an item descriptor as well as its properties,if we specify cache mode for an item descriptor,it will become the default cache mode for all the properties inside that item descriptor unless specified other wise.

See below example.

Here we are specifying the cache mode locked for the item descriptor 'account',but dont want the 'balance' property to be cached which if not specified will inherit the cache mode of the item descriptor.So specifying the cache-mode as disabled for this property.

<item-descriptor name="account" cache-mode="locked">
    <table >
            <property name="balance" cache-mode="disabled"/>
   </table>
</item-descriptor>

issue in deleting files from windows search results - cannot read from source file or disk

I faced a strange issue while trying to delete  files from windows search results.My idea is to delete all the image files from my computer,so for this i opted windows search option,i tried to search 'Pictures and Photos' from mycomputer,it had given me a list of files.I sticked the traditional idea of doing ctrl-a shift-delete,but end up seeing the below exception.

Error Message in deleting files from windows search results

Solution:

Right click on the file, open the containing folder and started deleting all  files  from that folder using the traditional way of ctrl-a shift-delete,it worked !!!.

Do this process repeatedly to delete all the files.I believe there is no other easy way for this :)

Related Posts Plugin for WordPress, Blogger...