Tuesday, December 21, 2021

Interview Questions HCL

 project and your role

taskflows - what is parent flow?

EAR and WAR deployment

EO --2 can created 1 VO

MDS -- Meta Data Services --configuration

action vs action listener

ActionListener : ActionListener is the method which got invoked when the user clicks on the component like button, CommandLink, etc

Action : Action the outcome of where you want to move once Actionlistener is completed. This can be defined in the taskflow as an activity. 

    So when listener completed application is redirected to define activity.


lifecycle

Oracle ADF architecture : Oracle ADF is based on the Model-View-Controller (MVC) design pattern.

An MVC application is separated into:
1) A model layer that handles interaction with data-sources and runs the business logic,
2) A view layer that handles the application user interface, and
3) A controller that manages the application flow and acts as the interface between the Model and the View layers.

The Oracle ADF architecture is based on four layers:

• The Business Services layer - provides access to data from various sources and handles business logic. (EJB, Web Services, ADF BC, .xml Bean definition file)
• The Model layer - provides an abstraction layer on top of the Business Services layer, enabling the View and Controller layers to work with different implementations of Business Services in a consistent way. (.cpx, .dcx, .xml)
• The Controller layer - provides a mechanism to control the flow of the Web application.
• The View layer - provides the user interface of the application. (VO files (__vo.xml), .java, .jsp, .jspx, .uix)

auto submit

nested app modules

ADF Security

jazn-data.xml



Stored proc

functions

diff b/w func and proc

triggers

dodml()

serialization

linked list?

Linked List is a part of the Collection framework present in java.util package. This class is an implementation of the LinkedList data structure which is a linear data structure where the elements are not stored in contiguous locations and every element is a separate object with a data part and address part. The elements are linked using pointers and addresses. Each element is known as a node. 

Diff b/w hashmap and set?

HashSet is an implementation of Set Interface which does not allow duplicate value. The main thing is, objects that are stored in HashSet must override equals() for check for equality, and hashCode() methods for no duplicate value are stored in our set. 

HashMap is an implementation of Map Interface, which maps a key to value. Duplicate keys are not allowed in a Map. Basically, Map Interface has two implementation classes HashMap and TreeMap the main difference is TreeMap maintains an order of the objects but HashMap will not.HashMap allows null values and null keys. Both HashSet and HashMap are not synchronized.

Exception handling in adf


1. How to get VO in backing bean?

   a) From AM

    public static AppModuleAMImpl getAM() {

        BindingContext bc = BindingContext.getCurrent();

        DCDataControl dc = bc.findDataControl("AppModuleAMDataControl");

        AppModuleAMImpl am = (AppModuleAMImpl)dc.getApplicationModule();

        return am;

    }


        ViewObject vo1 = ReusableMethodsClassPos.getAM().findViewObject("PosDeliveryDtl2");

        Row r = vo1.getCurrentRow();

   b) From Iterator

        DCBindingContainer bindings = (DCBindingContainer)resolveExpression("#{pageFlowScope.ptBindingContext}");

        //DCIteratorBinding iterator = bindings.findIteratorBinding(iteratorName);

        String vo_itr1 = (String)resolveExpression(iteratorName);

        DCIteratorBinding dcItteratorBindings = bindings.findIteratorBinding(vo_itr1);

        ViewObject vo = dcItteratorBindings.getViewObject();


        return vo;

2. Difference between Backing bean and Managed bean?


3. How to detect hostname?

public static String getClientIpAddress() {

String ip = null;

FacesContext facesContext = FacesContext.getCurrentInstance();

ExternalContext ectx = facesContext.getExternalContext();

HttpServletRequest request = (HttpServletRequest)ectx.getRequest();

String cIp = request.getRemoteAddr();

System.out.println("---Client Ip---:" + cIp);

System.out.println("-----" + request.getHeader("user-agent"));

/* try {

InetAddress ipAddr = InetAddress.getLocalHost();

ip = ipAddr.getHostAddress();

System.out.println(ip);

} catch (UnknownHostException ex) {

ex.printStackTrace();

} */

return cIp;

}


public static String getClientHostName() {

/* String hostr =

((HttpServletRequest)FacesContext.getCurrentInstance().getExternalContext().getRequest()).getRemoteHost();

System.out.println("---Client Hostname---:" + hostr); */


InetAddress ip = null;

String hostname = null;

try {

ip = InetAddress.getLocalHost();

hostname = ip.getHostName();

} catch (UnknownHostException e) {

e.printStackTrace();

}

System.out.println("hostname:" + hostname);

return hostname;

}

4. Difference between Binding Container vs Binding Context?

Binding Context is basically a map between data controls and page definition (contain bindings information) of pages in the application. Whenever an adf client or controller initiates an interaction with the business service, it(the interaction) is managed by the application through a single object. This object is the Binding Context.

Binding Container is used to instantiate page bindings. it contains bindings , executables and datacontrol mappings.

5.




No comments:

Post a Comment