Posts

Showing posts from September, 2011

share/install same datasource/ear with different schema in Weblogic 10.1

Create 2 Admin Server(one in each separate domain ) ,After that start the Admin Server which will   default run in ports 8860 and 8850.then either open the component atg/dynamo/Configuration in ACC,modify the rmiPort and DrpPort to 8861 and 8851  OR create a component(Configuration.properties)in  the path C:\ATG\ATGXXX\home\localconfig\atg\dynamo,set the properties rmiPort=8861,drpPort=8851,now start the second Admin Server(testServer),configure your datasources  and deploy the EAR. But in this method , if the Admin/test  Server is shutdown or stopped,you need to do the whole process again,also you need to make sure there is no component present at the initial server start up time. Pros :Easy and fast  to configure. Cons :There  is a chance of Port conflicts,if we are not deleting the       component from the path each/first time        When we start/restart the Servers.Chances of typo,because we       need to change the values of ports frequently compare to the       e

Configure multiple Admin Servers in different domains simultaneously

Create an Admin Server as usual(Admin Server - > localhost:7001) in base_domain with default port.For Configuring the second Admin Server follow the instructions below. Weblogic Changes -> Go to the Domain Configuration Wizard. 1. From Start Menu,select Programs->BEA Products >    Tools >ConfigurationWizard 2. Select "Create a new Weblogic domain". 3. Select "Generate a domain configured automatically...." and    click “Next”. 4. Select the username,password and the appropriate JDK(eg:    C:\jdk1.5.0_18). 5. After that you will get a screen to customize,answer yes to that    and change the port  to 7003 and leave the rest to default. 6. Give the name for the domain as “test_domain” and click “create”. 7. Create the new domain. 8. Start the Admin Server(testServer),Configure the required    datasources and deploy EAR. 9. Modify your weblogic startup   script    (C:\bea\user_projects\domains\test_domain\bin\startWebLog

remote debug in eclipse with both Admin and Managed Servers running

For configuring Remote Debug in Managed Weblogic Server,the very first golden rule is,you should not specify any port number of  weblogic admin or  managed server which is running ,it has to be a free port(use this link to find the appropriate ports List of Ports ). How to create managed weblogic server and run multiple EAR's can be found in this link -> Run Multiple Ear in Managed Server Mode How to run remote debug in Admin server can be found in the link -> Remote Debugging Weblogic Admin Server The configuration  for remote debug is specified in the startup script 'setDomainEnv.cmd'. First Approach Here we need to  create three scripts corresponding to the orignial scritps,'startManagedWeblogic.cmd', 'startWeblogic.cmd' and 'setDomainEnv.cmd. For Eg: Create the scripts  startManagedATGProductionWeblogic.cmd, startWeblogicATGProduction.cmd, setDomainEnvATGProduction.cmd by copying from the original script .Modify t

configure jadclipse in eclipse platform

Image
download the zip file jad158.zip,This can  be downloaded from the following link. Java Decompiler extract the zipfile to verify the files 'net.sf.jadclipse_3.3.0.jar' and 'jad.exe' are present. copy the net.sf.hadclipse_3.3.0.jar  to the working copy of your eclipse plugin folder. open your eclipse goto  Window->Preferences,Expand the Java Tab,now you will see the JadClipse option. click on the 'JadClipse' option tab,you may find two fields.set the values as below. 1. Path to decompiler to your jad executable location    (eg D:\workspace\setup\JAD\jad158.exe). 2. Directory for temporary files to  any desired folder(eg    D:\workspace\setup\JAD). Click Apply,Ok and Restart your Eclipse,done !!! Now press F3 button on the class to view the source for that class. Configure JUnit Download the junit-4.10.jar file from the location  and add this file in the java build path on the Eclipse Project where we want to configure the Junit.

download,copy jad158.zip file for JadClipse

Image
click on the link jad158.zip download the jar file. let me know if you are finding any difficulty in downloading this  file ,i have already downloaded this and its working,if you have faced some issue in downloading this file,i can upload the file in some free ware site,or i can send the zip file via email since the file size is not big.Please leave your email id in the comments section in that case. Junit Download Navigate to the link http://sourceforge.net/projects/junit/files/junit/4.10/ .Click on the link junit4.10.jar.   also see Configure JadClipse and JUnit in Eclipse

Unversioned and Versioned Repositories in ATG Content Administration

Unversioned 1.Resides in CA Environment. 2.Instance of GSA  3.No modifications are required in  Unversioned Repository    Definitions.                                                    4.No Extra properties are required.                    5.'this' attribute is not applicable here                                              Versioned 1.Resides in Production Environment. 2.Instance of Version Repository 3.Needs modifications in Versioned Repository Definition,eg: Remove   Foreign key  relationships,Remove unique attribute if   used. 4.Other versioning properties,such as asset_version,is_head etc.are   automatically added to Item  definition  by CA server. 5.Set versionable attribute to specify which assets   needsVersioning.By default all asset are  versionable.   Note: In both scenarios you need to follow the repository best practices, Repository Best Practices

Significance of ATG Content Administration in Ecommerce

There are other CA products available which support file asset versioning but Repository assets versioning is only possible with ATG CA. ATG provides different deployment methods, all of which are useful  based on what the scenario is, One-Off Deployment Switch Deployment Staging Deployment One-Off Deployment In some instances you might need to verify project content prior to the workflow deployment,like you can evaluate the performance of the project content or its gui elements before submitting review for that project,This scenario you can deploy the project to a site defined as one-off target. Switch Deployment Basically Repository Assets and File Assets can be deployed uisng Switch Deployment.This requires multiple Databases one an active database and other one Inactive.Repository assets are deployed to the inactive database first and once the deployment to this database completes ,the SwithcingDataSource switches the DataSource to this updated Database and th

Samsung Galaxy Pro(B7510) restarting often/problems

Image
I purchased Galaxy Pro B7510 5 months back(Running in Fro yo -Android 2.2),but last 2 days it started rebooting every 5 or 10 minutes.I checked the possible solutions in internet.I tried few methods  but finally i solved the issue.Following are the steps i tried. I have cleared the cache to check whether any possible depletion of memory.This will solve the issue  if the memory is depleted. While starting the phone hold the power key and 'T' key of Qwerty Keypad until you are  shown a system recovery screen.'System Reboot' will be default option selected,if not navigate using    your 'volume key' to scroll down to  'System Reboot' and press 'Home key' from your keypad to  Reboot the System.Verify your issue is solved. Switch Off your mobile phone,take out your Sim card and battery and place it back,now switch on and see if it solved the issue. If the issue is still persisting,from your phone

Content Administration in Ecommerce- Asset Types

    Types of Assets Repository assets Promotions, price lists, catalogs, etc. File assets        ATG-specific [ ConfigFileSystem ]     ATG Scenarios, targeters, slots, segments   Generic [ WWWFileSystem ]     Jpg, pdf, etc. JSPs can be considered as content if managed by business users e.g. email templates, product templates etc.Otherwise JSPs are source  code. Customer-managed content e.g. orders, reviews, profiles, Java class, components, etc can not be considered.   

Significance of Content Administration in Ecommerce

Content can be updated without bringing production site down. Business users can create and deploy content on live site without any IT intervention.Content changes can be previewed and approved  before making it live. Each and every changes made to the content can be tracked. Content changes can be reverted back to a particular version if required.Who changed what, under whose approval, can be tracked. you can also verify the significance of ATG Content Administration in Ecommerce.

ATG Best Practices Form Handler Dont's

Don’t mix business logic with presentation: Formhandler and JSP page should not have any business logic. It should only contain page field’s validation. All business logic regarding validation should be defined in global component and formhandler should refer to it in handler method. Reusable components: Different Formhandlers will be able to reuse the components. Separation of business logic and presentation logic: You can change the way data is displayed without affecting business logic. In other words, web page designers can focus on presentation and Java developers can focus on business logic. Don’t use FormHandler to load the page information, use Droplet to populate data for  display o They can eliminate scriptlets in your JSP applications. Any    necessary parameters to the Droplet can be passed as attributes,    and therefore no Java code is needed to initialize or set   component properties. o They have simpler syntax. Scriptlets are written in Java code

ATG Form Handler Best Practices Do's

Each and every JSP page should be associated with one form handler,it may be custom or OOTB form handler. Avoid reusing custom formhandler; ideally it should be one to one mapping between page and custom formhandler.  This will reduce the maintenance effort and increase the readability. Formhandler scope may be request or session, request scope is always recommended. Sometimes we can define session scope if the formhandler is called several times in one session, to avoid creation of multiple copies. But be very careful, you need to reset and initialize formhandler field after usage. Formhandler should only refer to same scope or higher scope component i.e. session formhandler should never refer to any request scope component;session and global are valid scopes,and allowed. Never use Nucleus.resolveName to resolve component,this is very extremely expensive call. Better re-think about your component architecture. Formhandler should never refer to another formhan

ATG Repository Best Practices/Useful Tips While Creating Repository

Never user one primary table in more than one item descriptor,this can create problem in Item caching.If table get updated by one Item, other Item will not get invalidate. Try to avoid derived properties, it can adversely affect system performance Don’t use derived and transient property as part of RQL and ATG Query Use Lazy loading in repository item to improve performance. Most of time developers traverse from parent to child repository, you may need to evaluate. Use RQL instead of looping through repository item which can affect performance. Maximize use of Query Builder to build query in case you need to build query dynamically rather than executing filtering at server end. Use enumerator instated of flag until it is required. You can also turn on debug messages by including a loggingDebug attribute tag in the repository definition for that item descriptor or property. Use ATG cache pre-loading, this will achieve better performance disadvantage of this would

How to run remote debug in eclipse with weblogic

Image
I came across so many question and answers posted by peoples regarding to initiate a remote debug session from eclipse to application which is running in xyz port of weblogic server.so thought of coming up with what i have done,which is pretty straight forward.(i have tried this successfully in Weblogic9.1) The very first golden rule is,while configuring the remote debug session make sure you are not specifying the same port number where your weblogic server is running,it has to be a free port( use this link to find the appropriate ports ->  List of Ports ). The configuration  for remote debug is specified in the startup scripts of weblogic server,either in the 'startWeblogic.cmd' or 'setDomainEnv.cmd' or any other executable file associated with startup of the server. I am modifying the script 'setDomainEnv.cmd'.Below are the two things you need to do to achieve this. 1.Set the debgug flag as true in the first line of the script.(set   debugF

ATG Repository Caching Dont's

Don’t enable query caching it is turned off by default. If items in your repository are updated frequently, or if repeated queries are not common, you may not receive enough benefit from a query cache to justify the minor amount of overhead in maintaining the cache. Disable caching when there is a possibility that the underlying data will be changed by a non-Dynamo repository application. You can also disable caching for an individual property within an item-descriptor by setting the cache-mode="disabled" attribute on the property itself. All other cache modes must be set at the item descriptor level, however, and cannot be set on a per-property basis. If you use locked cache mode, you should disable the query cache, since query cache invalidation messages are not distributed between server instances. If query caching is important for the performance of your application, use distributed cache mode.

ATG Repository Caching Do's

Caching: ATG prints lot of SQL queries on console if you turn on SQL debug info. Most of the developers get confused how this can optimize database operation. The following paragraph will answer all such doubts: The item caches hold the values of repository items. Repository queries are performed in two passes, using two separate SELECT statements. The first statement gathers the IDs of the repository items that match that query. The SQL repository then examines the result set from the first SELECT statement and finds any items that already exist in the item cache. A second SELECT statement retrieves from the database any items that are not in the item cache. If query caching is enabled, the first time a query is issued, the result set is retrieved from the database and stored in the query cache. Then, the next time this same query is issued, the SQL repository can retrieve the result set from the cache, rather than needing to access the database. This cache only hold repository id

install/deploy mutliple EAR at the same time in ATG platform

There are few things we need to take care while running multiple EARs in Managed Weblogic Servers during our development phase. Below are the steps followed by me in running more than one EAR's. This is how i did it. I assume you have knowledge on how to create an admin server and  i assumed you have created one which is listening to  port 7001. Now  1. In weblogic admin, goto weblogic->environment->server       - create a new managed server with port 7002. 2. In weblogic->environment->services->jdbc       - add newly created managed server as target to your    respectieve datasource XXX_DS 3. In weblogic->environment->deployment     - install your EAR  and deploy it. 4. From the ATG's home/bin directory - (eg:C:\ATG\ATG9.0    \home\bin)                 - create a DRP server by running following command         makeDynamoServer XXX-Drp-Server 8861 8851 5. In         C:\bea\user_projects\domains\base_domain\bin\      startManagedWebLog