Tuesday, February 25, 2014

Oracle ADF And Webcenter Questions With Answer

Oracle ADF and Webcenter interview questions

1. what is policy store and identity store in OID

Identity store refers to store containing enterprise users & group. Weblogic comes with an embedded ldap which is used  as identity store by fusion middleware components by default. You can configure external ldap servers like- OID, AD, Novell etc to be used as identity stores.
more on setting up Identity Store can be found here
policy store
Oracle Internet Directory (OID) can function as a policy store. A single directory server instance can function as a:
  • Policy store
  • Key store
Using a single directory server simplifies administration tasks. The following sections provide instruction on how to configure a single directory server instance to store policy data and encryption keys. If your implementation requires, you can configure a separate key store.

Configuring the Policy and Credential Store

For most environments, and especially production environments, you must reassociate your policy store with an external LDAP such as Oracle Internet Directory (OID), or a database. Note that when using an external LDAP-based store, the credential store and policy store must be configured to use the same LDAP server (either Oracle Internet Directory 11gR1 or 10.1.4.3). The identity store can, however, use any of the other supported LDAP servers; it does not need to use the same LDAP server as the policy and credential stores.
Reassociating the policy and credential store with OID consists of creating a root node in the LDAP directory, and then reassociating the policy and credential store with the OID server using Fusion Middleware Control, or from the command line using WLST. Reassociating the policy and credential store with a database consists of setting up the schema and database connection in the RCU, and then migrating the policy and credential store to the database from the command line using WLST.
Caution:
Before reassociating the policy store, be sure to back up the relevant configuration files:
  • jps-config.xml
  • system-jazn-data.xml
As a precaution, you should also back up the boot.properties file for the Administration Server for the domain.

The details you can find here

2. difference b/w databindings.cpx and datacontrol.dcx

The DataBindings.cpx file contains the Oracle ADF binding context for your entire application and provides the metadata from which the Oracle ADF binding objects are created at runtime. The DataControls.dcx file is created when you register data controls on the business services. This file is not generated for Oracle ADF Business Components. It identifies the Oracle ADF model layer data control classes(factory classes) that facilitate the interaction between the client and the available business service.

for details click here

3. diff b/w trinidad.config and trinidad.skins

trinidad.config file is ceated when you create a webcenter portal application. This is used to register the skin-family you are going to use for your entire application. Trinidad.skins is used when we use skin as a Jar file. This file provides a mapping between the Skin Id and the actual path where the skin exists.

4. train component when i go from 1st page to 2nd page.. in the 1st page it is asking to enter one mandatory field which is not shown how to avoid this error.

The solution is using skip validation property of page definition file.
open page definition file and choose root node and set skip validation property to true. 

5. what is binding context and binding container.. what are the 3types of bindings
The Oracle ADF binding context is a runtime map (accessible through the EL expression #{data}) of all data controls and page definitions within the application. The binding context does not contain real live instances of these objects. Instead, the map contains references that become data control or binding container objects on demand. The ADF lifecycle creates the binding context from the application module, DataBindings.cpx, and page definition files.


In Oracle ADF, the group of bindings supporting the UI components on a page are described in a page-specific XML file called the page definition file. The ADF Model layer uses this file at runtime to instantiate the page’s bindings. These bindings are held in a request-scoped map called the binding container, accessible during each page request using the EL expression:
  #{bindings}


This expression always evaluates to the binding container for the current page. For example, to access the collectionModel of binding object named MyShoppingCart , you use the EL expression:
  #{bindings.MyShoppingCart.collectionModel}

BindingContext

The binding context lives in the HttpSession for each end user. It holds references to lightweight application module data control objects that manage acquiring an application module instance from the pool during the request (when the data control is accessed) and releasing it to the pool at the end of each request. The data control holds a reference to the ADF session cookie that identifies the user session. The binding context also holds references to binding containers. The binding context might contain many data controls and many binding containers.

There are three options to access the binding context at runtime by Fusion Web Applications:


BindingContext.getCurrent()

BindingUtils.getBindingContext()
JsfUtils.resolveExpression("#{data}")

For option 1 and 2, they are implemented in the same way internally:


  import oracle.adf.model.BindingContext;


  (BindingContext)ADFContext.getCurrent().getSessionScope().get("data");


However, option 3 is different and resolveExpression() is defined to be:

public static Object resolveExpression(String expression) {
FacesContext facesContext = getFacesContext();
Application app = facesContext.getApplication();
ExpressionFactory elFactory = app.getExpressionFactory();
ELContext elContext = facesContext.getELContext();
ValueExpression valueExp =
elFactory.createValueExpression(elContext, expression,
                     Object.class);
return valueExp.getValue(elContext);
}

As you can see it, the third approach is more expensive because it involves extra expression parsing and syntactic validation of the expression.


BindingContext is an object that implements the Map interface and exposes generic methods to access the binding layer. For example, to find a data control, you could use the findDataControl()method on BindingContext 

  findDataControl(dc_name)

BindingContainer

To access binding container, you first retrieve binding context as described above; then you use binding context's getCurrentBindingsEntry method to retrieve binding container object:
  import oracle.binding.BindingContainer;

  BindingContainer bc = bindingContext.getCurrentBindingsEntry();

Internally, getCurrentBindingsEntry() is implemented as follows:
  (BindingContainer)ADFContext.getCurrent().getRequestScope().get("bindings");

If you use option 3 as described above, you can retrieve binding container in a more straightforward way (although it's still more expensive):

FacesContext facesContext = FacesContext.getCurrentInstance();
ExpressionFactory exp = facesContext.getApplication().getExpressionFactory();
DCBindingContainer bindingContainer =
(DCBindingContainer)exp.createValueExpression(facesContext.getELContext(),
"#{bindings}",DCBindingContainer.class).getValue(facesContext.getELContext());

Fusion application developers who prefer working with type-safe methods can cast the bindings instance (i.e., BindingContainer) to DCBindingContainer:


DCBindingContainer object exposes more methods than the its super class object BindingContainer. For example, you can access the application module's client interface from this DCBindingContainer by naming an ADF action binding or an ADF iterator binding as shown below:

// 1. Access the binding container
DCBindingContainer bc = (DCBindingContainer)getBindings();
// 2. Find a named action binding
JUCtrlActionBinding action =
(JUCtrlActionBinding)bc.findCtrlBinding("SomeActionBinding");
// 3. Get the data control from the iterator binding (or method binding)
DCDataControl dc = action.getDataControl();
// 4. Access the data control's application module data provider
ApplicationModule am = (ApplicationModule)dc.getDataProvider();
// 5. Cast the AM to call methods on the custom client interface
StoreServiceAM service = (StoreServiceAM)am;
// 6. Call a method on the client interface
service.doSomethingInteresting();

6. i have an am with a vo and another am with a vo both are on a taskflow which has rollback as end transaction ... what will happen 
Configure the taskflow to use "Always Begin new transaction" started on task flow entry, commit will be done on task flow level from return activity. 
Also if the commit fails for any of the data control (local or ADF Lib) there will be no change in either of the DC. Both will be rolled back.



7. difference between am transaction and task flow level transaction

The task flow transactions are an abstraction on top of the data control transaction, in your case ADF BC AM transactions. They allow a group of data controls to be committed or rolled back as a group. They are not necessary if you have a single ADF BC AM for your application. In this case turn task flow transaction options off by using the option.

For details click here

8. what is meta data commit during life cycle phase of adf what happens here
The metadata changes are written to the MDS repository after the JSF Invoke Application phase.

9. in case of  java control or ejb does it have a datacontrol.dcx file
datacontrols.dcx exists when you create custom data controls based on POJOs, web services, EJBs and the like. It describes or stores the metadata about the data control, essentially the wiring required to make the underlying service (e.g. POJOs, web services) exposed through the data control palette, and the runtime settings so the ViewController layer knows how to make use of it.
10. in case of security if tomorrow some other admin role comes in then i need to change code... i don't want to do at code level where should i do it 

In case of security we can first enabled the ADF Security in application and when new Admin role comes we should not be updating java code but only we need to do some role mapping related changes in security file, such as jazn-data.xml or if we are using third party LDAP or oracle provided OPSS or in OIM.  more on security can be found here

11. how does a join query and view link work 

Oracle ADF view links are business components that define a relationship between two Oracle ADF view object definitions (the "source" and "destination" view objects) based on sets of view attributes (the "source" and "destination" attributes) from each. These can range from simple one-to-many relationships to complex many-to-many relationships. This allows you to easily create master/detail relationships between data controls in the client. For example, creating a view link between view objects will allow you to create relationships between:

A dropdown list for selecting a customer and a table displaying that customer's orders

The nodes in a tree control and their respective children
An HTML page containing two frames: one that allows the user to browse for items and the other that lists the wherehouses in which the selected item is stored

A view link definition relates two view object definitions. In the vast majority of cases, the view object definitions will contain SQL queries that access a database, and the view link definition will relate those queries using a parametrized WHERE clause, which is appended to the destination view object's query and resolved using the values of source attributes.


12. i have 2 taskflows, on which i have page fragments jsff and i have a jspx which all components should i secure.
you can secure taskflow and jspx page, page fragments can we use withing taskflow as a view activity so it will be secure by securing taskflow itself.

13. have you worked on java script  or  ajax

14. how good are you in webcenter

15. How can i do Exception handling at global level


16.what are Contextual events

Contextual events is a powerful event/handler framework which is provided by Oracle ADF. This framework facilitates inter region communication. Contextual Events are used in following type of communication.
  • Region to Page Communication.
  • Page to Region Communication.
  • Region to Region Communication.

Since the taskflows are independent they don't and shouldn't be aware or depend on specific other taskflows being in the same page. The contextual event mechanism allows them to keep their independence while still co-operating and passing events/data in the same page.

17. What r the six service methods at Am level

a)       Access an existing view object instance by name findViewObject()
b)      Creating a new view object instance from an existing definition createViewObject()
c) Creating a new view object instance from a SQL Statement createViewObjectFromQueryStmt() 

Note:
This incurs runtime overhead to describe the "shape" of the dynamic query's SELECT list. We recommend using this only when you cannot know the SELECT list for the query at design-time. Furthermore, if you are creating the dynamic query based on some kind of custom runtime repository, you can follow this tip to create (both read-only and updateable) dynamic view objects without the runtime-describe overhead with a little more work. If only the WHERE needs to be dynamic, create the view object at design time, then set the where clause dynamically as needed using ViewObject API's.

d)   Access a nested application module instance by name findApplicationModule()
e) Create a new nested application module instance from an existing definition createApplicationModule()
f)    Find a view object instance in a nested application module findViewObject() 

Note:
To find an instance of a view object belonging to a nested application module you use a dot notation nestedAMInstanceName. VOInstanceName


g) Accessing the current transaction object getTransaction()

18. Difference between user scope and session scope


19. How do you do load balancing

20. i have a value in session scope after my user logs in and logs out .. the value is gone... i want it to be available when i login again how do u do that.
You use session persistence to permanently store data from an HTTP session object to enable failover and load balancing across a cluster of WebLogic Servers. When your applications stores data in an HTTP session object, the data must be serializable.
There are five different implementations of session persistence:
  •  Memory (single-server, non-replicated)
  •  File system persistence
  •  JDBC persistence
  •  Cookie-based session persistence
  •  In-memory replication (across a cluster)
21.a Difference between bounded and unbounded taskflow

Difference between Bounded and Unbounded Taskflow.
Bounded TF have single entry point and can have zero or more exit points. Whereas Unbounded TF has one or more entry point for the application (adfc-config.xml).
Bounded TF must have a default activity (Which is the entry point) whereas Unbounded TF cannot have default activity.
Bounded TF can be parameterized where as UnBounded TF cannot be parameterized.
We can create multiple Unbounded TF but during runtime they all become into one unbounded TF, thus resulting into inefficiency whereas it’s not true in the case of Bounded TF.
Bounded TF is re-usable whereas UnBounded TF is not.
We can implement Undo feature with Bounded TF( because it supports Transaction) but UnBounded TF doesn’t.
In Nutshell, We have to have one Unbounded TF and many Bounded TF to take advantage of many features such as re-usability, train stop, data sharing between task flows , transaction, etc.

21. i have certain records i want to make a db trip only once in the beginning and store it in vo cache ... as i want to use the same values again n again ... i do not want to make anymore db trips how do u do that.

22,  what is transaction handling... like have u worked on asynchronous pushing of data where the data is coming from db and in UI before display you have to modify and show the data.

23. how to implement single sign on in adf

24 . one of my user is entering data into db through adf form 1,2,3 to other user i should show as 10,20,30... it should automatically get refreshed for other user both opened the form at the sametime.

25. my client is using oracle apps... how can i convince him to use this fusion soa

26. in bpel process where do i write all my business rules

27. in taskflow i got exception some weird exception occurs once in a while i want to log that how can i do it.

28. i have R12 application which one would be better for me oaf or adf

29.  i have two procedures in db A and B ... in A... B is getting called in B... A is getting called and this is going to infinite loop how can i exit out of the loop after a certain process is completed.

30. difference between dbadapter and oracleapps adapter why we need both.

31.  what are the different ways for a db connection other than using plain java or adf connections...  like for any application how  can i connect to db.

32.  Java Question : how to dynamically increase array size at run time.. if array length is 10 i want to add 5 more as per my requirement at runtime dynamically.

33. What is a view scope

34. In a task flow after certain activities an error occurs i want to rollback the activities that have been done how can we do it

35. In a TF u r calling another module TF then you are performing some transactions ... your first TF activities got committed the error occured before commiting other module transaction how to roll back the commited changes 

36. on an adf table i have delete link for each row.. when a user  clicks a delete link for that end user that row should be deleted but in the db that row should be updated to inactive.. like overriding of remove method what exactly do u do here

37. when you have added other module as a jar and you are doing some transaction how to make your AM as the main AM rather than other modules AM's . Is there any configuration setup you do

38. for email or sms... if i want to send email or sms daily at 5 a.m where do i actually schedule that

39. what is mvc.. where does controller fit into it what is the exact role of it

40. what r the three types of generic bindings

41. Java Question:  how can i store a UI input values in a java algorithm what ever the user is entering one by one in different fields ...  without storing it in db or any file. i want to store in the java code only.

42. What are the Best practices for ADF

43. My Page is loading till yesterday now its not loading may be due to data increase , etc how do u proceed on this what are the things that u will look at

44. when your team starts development what all things u ask them to look at ... in development whether it is related to performance, etc

45. if i want to increase the performance of my page even by atleast 1% or present thing what all things u do

46. on a popup there is a button save&close on that what all values i have entered iam validating based on a button click calling bean in a popup form ... values are getting saved but my popup doesn't close what should be done here. Previously it was closing on binding to a bean its not closing

47. what are declarative components have u used them

48. difference between action and action listener

49. what is the architectural design of your project.

50. Other than exposing webservice as a data control is there any other option to show it on a UI.

51. how do one portlet communicate with the other portlet in a page. if some change is done in one portlet based on that it should reflect in other portlet.

52. what all challenges u faced in adf... what are the things that you would like to see the improvement in the next versions of adf.

53. have u worked on Nested am's

54. how do u know that you need to go for a webservice like osb in the application u r developing in adf

55. life cycle of webcenter

56. difference between  process action and render

57.  how do u define the data source... is it a jdbc or jndi connectivity... how do u test your bc component when you run your am if it is a jndi connectivity how can u test that

58.  how do you define the db connectivity.

59.  what is a collection interface.

60. why are java interfaces actually used what are its advantages

61. Sorting in collection how do u do that

62.  design patterns in oops .  what is factory method

63. What is the diff between a normal web development and Oracle webcenter portal . What r the advantages  of webcenter compared to using web development

64. what is the diff between visible property and render property

65.  how do you define pagination in adf ,  if i have 100 pages just by giving the page number below i want to go to that page. how do you do that

66. what are converters and validators have you used them. what is a custom converte r and custom validator

67. how do you put a page fragment jsff in another page fragment which is a jsff what component do u use.

68.  what is enhanced for loop what is the benefit of it

69. what all validations u did  where all you can do validations

70. how to use a webservice on a UI. Other than using data control is there any way.

71. menu... u r saying all the pages you displayed as links on a homepage if i want to display in menu how can we do that

72. what design patterns you used in your project

73.  what is the architectural design of ur project

74. what is the differrence between action and action listener.

75. Jsf life cycle phases

76. difference if i set immediate=true on a button and  if i set immediate=true on a text field

77. what are the life cycle phases that will be skipped if i set immediate = true on a button

78. what life cycle phases will be skipped in auto submit = true and in case of partial submit = true

79. what life cycle phases get executed during ppr.

80. why should i have a read only vo which is displaying results on a page rather than having it on an eo... my requirement is simple the data comes from just one table i 

81. can make a vo non updateable but still why cant i use it based on an eo... r there any dis adavantages.

82. i have two am's can i do transaction of one am in other

83. other than exposing webservices as data controls do i have any other method in adf where i need one of my bpel process to be shown on ui

84. other than ridc socket method what r the different ways i can create connection to ucm in webcenter

85. what is a page template what is the significance of it why do u use it

86. my page is loading very slow... i have one lov that is having huge number of data basically its a master lov... now my data is not changing in db.. so what are the 

87. ways that i can improve the page performance... basically i am looking at a very high level answer for this

88. what are geometry components and transaction components in adf

89. what is an adf taskflow template why do u use it

90. what is the diff between static and dynamic region

91. what are the different layouts u used

92. in jquery and html5 there are very high features compared to adf... so were there any customer expectations in ur project on this

93. without using contextual events how can i refresh the other region on a page

94. what is am pooling

95. how can i test whether my am is pooled or not

96. i want to display one message in all of my modules after a transaction is complete how can i do that

97. what r the things u consider before building a template

98. what is a task flow template what does it contain

99. what is a coarse grained authorization and fine grained authorization

100. how can i build a thread program in java

101. i am conducting interviews daily.. i want to store name, dob, gender, etc details in a java program i dont want any 
secondary storage like db, flatfile, etc what is the best method to store such type of details.

102. how does mvc work in adf.

103. diff between webcenter portal framework and webcenter spaces

104. my query is taking too long if i were to tune it what r the 5 to 6 steps that i will look at

105. what are the features tht are available in string tht are not present in string buffer
106. Which version of Jdev and weblogic did u worked

107. is it a good practice to call AM in bean... if not why ?

108. my UI has combo box list of values  in that table name is there what ever table i select the results should be displayed dynamically i am passing the table name.

109. what is inter portlet communication