Sunday, January 14, 2007

ATG FAQ

1 Explain about Custom Tag Library JavaServer Pages (JSP) tag libraries define declarative, modular functionality that can be reused by any JSP page. Tag libraries reduce the necessity to embed large amounts of Java code in JSP pages by moving the functionality of the tags into tag implementation classes.
Tag Libraries has one subcategory:
The JavaServer Pages Standard Tag Library (JSTL) encapsulates as simple tags the core functionality common to many Web applications. JSTL has support for common, structural tasks such as iteration and conditionals, tags for manipulating XML documents, internationalization tags, and SQL tags. It also provides a framework for integrating existing custom tags with JSTL tags.
2 What is Value Object and Data transfer Object? When an enterprise bean uses a Transfer Object, the client makes a single remote method invocation to the enterprise bean to request the Transfer Object instead of numerous remote method calls to get individual attribute values. The enterprise bean then constructs a new Transfer Object instance, copies values into the object and returns it to the client. The client receives the Transfer Object and can then invoke accessor (or getter) methods on the Transfer Object to get the individual attribute values from the Transfer Object. Or, the implementation of the Transfer Object may be such that it makes all attributes public. Because the Transfer Object is passed by value to the client, all calls to the Transfer Object instance are local calls instead of remote method invocations.
Use a Transfer Object to encapsulate the business data. A single method call is used to send and retrieve the Transfer Object. When the client requests the enterprise bean for the business data, the enterprise bean can construct the Transfer Object, populate it with its attribute values, and pass it by value to the client.
Clients usually require more than one value from an enterprise bean. To reduce the number of remote calls and to avoid the associated overhead, it is best to use Transfer Objects to transport the data from the enterprise bean to its client.
3 What is the difference between VO and DTO both limit the number of remote calls in EJB's
4 What is the interface to be implemented for serialization java.io.Serializable
5 What are other patterns similar to Value Object Data transfer Object, Business object
6 Explain about Session Facade Pattern The Session Facade pattern defines a higher-level business component that contains and centralizes complex interactions between lower-level business components
Enterprise beans encapsulate business logic and business data and expose their interfaces, and thus the complexity of the distributed services, to the client tier.
· Tight coupling, which leads to direct dependence between clients and business objects;
· Too many method invocations between client and server, leading to network performance problems;
· Lack of a uniform client access strategy, exposing business objects to misuse.

Use a session bean as a facade to encapsulate the complexity of interactions between the business objects participating in a workflow. The Session Facade manages the business objects, and provides a uniform coarse-grained service access layer to clients.
Service Locator ::
-------------------------
Enterprise applications require a way to look up the service objects that provide access to distributed components. Java
TM 2 Platform, Enterprise Edition (J2EE) applications use Java Naming and Directory Interface (JNDI) to look up enterprise bean home interfaces, Java Message Service (JMS) components, data sources, connections, and connection factories. Repetitious lookup code makes code difficult to read and maintain. Furthermore, unnecessary JNDI initial context creation and service object lookups can can cause performance problems.
The Service Locator pattern centralizes distributed service object lookups, provides a centralized point of control, and may act as a cache that eliminates redundant lookups. It also encapsulates any vendor-specific features of the lookup process.
7 What is nucleus Nucleus is atg component container for managing components that are registered within nucleus. It also defines the component in a hirerachial name space.
8 What is the difference between Web Container and Nucleus? Web container is to process the request and response objects and servlet. Nucleus process component that are registered with nucleus container.
9 Can we access ATG Component from plain Java object? yes, use JNDI lookups and resolveName
10 Have you used Log4J or any other logging software?
11 What are the scopes available in JSP Page, Request, Session, and Application
request scope for exist for the particular request end,page scope available till page exist, session scope availble for particular user session, application scope available throughout the application.
12 Explain about Application level scope Application scope available throughout the application
13 What is the difference between Session scope and Application scope?
14 What are all the scopes available for Nucleus Components Global, Request, and Session
15 Which scope is used for FormHandler? request scope, in case if we want to persist any data in the session then it can be session scope,
16 Explain about Servlet Pipeline. It is facility provided by dynamo application framework to manage the request, it uses many pipeline servlets to filter the request like handling dynamo request, session cookies, MIME type
17 How do you display error messages in ATG using JSP Pages Using ErrorMessageForEach droplet
18 What is the droplet used to display errors Error Message for Each droplet
19 What is the difference between Dynamic Include and Static include? In static includes, a resource is included when a JSP program is accessed. In dynamic includes, it is included when a JSP is translated into a Servlet.
Static include:
<%@ include file=" Filename to be reused " %>
Dynamic include:
flush="true" />
Dynamic include process the page at runtime with some input parameters. Static include the process the page at compile time without any parameter as input.(directives)
20 What is the component used for Transaction and when will you use Transaction? javax.transaction.UserTransaction
begin(), commit(), rollback(), getStatus(), setRollbackOnly(),
setTransactioTimeout(int seconds)
TransactionDemarcation, when system wants to perform a set of operation which either commited or rollback in case of any problem
21 What is the purpose of RQL Statement? It is simple way to query the repository items using the query langauge
22 What Caching mechanism ATG Provides? four type of caches ,
1 .No cache(Disabled cache)
2. Simple cache - caching handle separatelly in each VM, with no validation event to synchronize updates in different server
3. Locked cache - read and write locks are used to synchronize the caches
4. Distributed cache - it will valid the events to synchronize the updates.
23 There is no input given. But the report has to be generated. What caching mechanism you use? Simple cache
24 What is Single Sign-on? It is a mechanism whereby a single action of user authentication and authoriation can permit the user to access all computer and system, where he has the access permission, without the need to multiple passwords. It redues human error and major components failure and it highly desirable but difficult to implement.
25 Explain about Connection Pooling It is a technique that was pioneered by database vendors to allow multiple client to share a cached set of connection object that provide access to the database resource.
26 What is the purpose of using connection Pooling? It is purpose to share a set of connection objects to multiple client on request.
27 When do you maintain connection pooling? This is to avoid the opening and closing of connection on database becoz of the multiple client request reduce the performance of the database.
28 Can you access servlet through URL?
29 What is the purpose of Welcome file in Web.xml? Its initial page of an web application
To show the starting page of the application when user access the application through a particular URI.
File name to use as a default welcome file, such as index.html
The optional
welcome-file-list element contains an ordered list of welcome-file elements.
When the URL request is a directory name, WebLogic Server serves the first file specified in this element. If that file is not found, the server then tries the next file in the list.
30 What is role based security? Role based security define the user access of the particular urls
31 Where do you place the library files which will be used commonly for more than one application? in home
32 What is the difference between Collection and ArrayList? Collection is interface, Arraylist is class implements List
Vector
and ArrayList are very similar. Both of them represent a 'growable array', where you access to the elements in it through an index.

ArrayList it's part of the Java Collection Framework, and has been added with version 1.2, while Vector it's an object that is present since the first version of the JDK. Vector, anyway, has been retrofitted to implement the List interface.

The main difference is that Vector it's a synchronized object, while ArrayList it's not.

While the iterator that are returned by both classes are
fail-fast (they cleanly thrown a ConcurrentModificationException when the orignal object has been modified), the Enumeration returned by Vector are not.

Unless you have strong reason to use a Vector, the suggestion is to use the ArrayList.
33 What is Session Management? The stateless nature of HTTP requires organisations and solution developers to find other methods of uniquely tracking a visitor through a web-base application. Various methods of managing a visitor’s session have been proposed and used, but the most popular method is through the use of unique session IDs.
An important aspect of correctly managing state information through session IDs relates directly to authentication processes. While it is possible to insist that a client using an organisations web application provide authentication information for each “restricted” page or data submission, it would soon become tedious and untenable. Thus session IDs are not only used to follow clients throughout the web application, they are also used to uniquely identify an authenticated user – thereby indirectly regulating access to site content or information.
34 How do you display form data again when an error occurs, since the form handler is in request scope?
35 What is scenario and targeting? And what is the difference?
36 Can Targeting be invoked by events?
37 Have you used DSPL tags?
38 How does dynamo Process the JSP request?
39 What are the design patterns you have used? (They may ask to explain one of them or some specific pattern) Business Delegate, Façade, Adapter, factory, Singleton, Data Access Object,
Business Delegate : want to hide the clients from he complexity of the remote communication with business service components.
Use a business delegate to encapsulate access to a business. the business delegate hides the implementation details of the business service, such as lookup and access mechanism.
Reduces coupling, improves maintainability
Translates business service exception
Improves availibity
Exposes a simpler, uniform interface to the business tier
Improves performance
40 When do you go for objects to maintain session data? Or what is the purpose of maintaining objects in session? In case of storing the User Information
41 What are the Handle methods available other than Submit and Cancel? handleReset, handleFormException
42 How do you write custom handle methods? Handle method return boolean with two parameter DynamohttpServletrequest and DynamoHttpServletresponse
43 Explain about Load Balancing in ATG. The Dynamo Load manager uses a Load Balancer component that contain the algorithm for distributing load among Dynamo Server. The load Balancer takes into account factor such as latency and number of session in distributing the load among the dynamo server.
latencySmoothingfactor
sessionVsLatencyWeight
probabilitySmoothingFactor
This is designed to adjust the probabilities among the server to balance load in order to alleviate the difference in latency and difference in number of current session running on each server.
44 Have you used Web Services?
45 Explain about MVC architecture?
46 How do you maintain Scalability? ease in which the system or component can be modified to fit the problem area. By implementing standard design pattern or defining the extensibility using interface and abstract method
47 Nucleus container resides in web container or not? Or what is the difference between nucleus and Web Container?
48 What about Application Scope in Cluster Environment?
49 What is Dynamo J2EE Descriptor? Define the application name and related details about war and taglibs used.
50 Which class provides Logdebug method GenericService
51 How to create Custom Droplet? Extending the DynamoServlet and implement the service method
52 How do you pass Parameters to droplet? dsp:param
53 Explain about JNDI Lookup InitialContext ic = new InitialContext();
Object obj = (Object) ic.lookup("dynamo:/comp");
54 Explain about nucleus lookup Nucleus.getGlobalNucleus().resolveName("");
55 What is User profile Component and what are the handle methods?
56 How to add attributes to the user profile? use xml-combine to append, remove and replace
57 What is XML- Combine Attribute and what are possible values? Explain.
58 Where do you handle error for each request?
59 Which Pattern does ATG Follow - MVC Model1 or MVC Model2? MVC model2
60 What is the default scope of the component? global
61 What is Servlet Bean? It’s a java bean which extends the Dynamoservlet and service method must be implemented.
62 What are the difference between Servlet bean and droplet Droplet is tag which embed servlet bean to display the output.
63 Two examples of ATG Servlet Beans CatalogLookup, ProductLookup, RepositoryLookup, ItemLookup, foreach, errormessageforeach, switch
64 If the bean is out of scope then how do you look up
65 Is it the better approach having business logic in form handler? no, can separate a business logic by implementing the interface
66 What are the components loaded initially? components which are add to initial service will get loaded InitialService
67 Can you access session scope component in global scope component? No, It
68 What is Droplet and what is the scope of Droplet? it global
69 Why do you have to specify tag libraries in Web.xml becoz the container has to be inform about the tld resource path
70 What is Servlet Context, Servlet Config?
71 When accessing the Component how do you access? Using Hierarchical Namespace like atg/commerce/shoppingcart
72 Do you need to implement Generic Component to make the regular java component as nucleus component? Without extending genericservice ,it wouldn’t be registered in nucleus.
73 Nucleus creates how many instance for global, session and request scope components
74 is dynamic include or static include? Dynamic
Design Patterns
1 Session Façade
2 Value Object
3 Data Access Object
4 Singleton
5 MVC Architecture
6 Factory Pattern

0 Comments:

Post a Comment

<< Home