Skip to main content

Posts

Accessing the BindingContext through Servlet in ADF Application

Follow the following steps to access the BindingContext in your Servlet 1. Create one seprate pageDef file without any fragement or page.We don't have any option to create  pagedef directly without any page. So go to the folder(on the drive C/D) where you want to add pagedef inside the application and copy one existig pagedef and paste.Rename this copied file with new name ex. MyPageServletPageDef. After that in jDev you can see this file in the same folder where you created through backend. 2. Add the method binding or iterator binding which you want to access in the servlet on the created pageDef file that is MyPageServletPageDef. 3.Next step is to register this pagedef in DataBindings.cpx file.   Open your DataBindings.cpx  file code through source and add follwoing code ex. MyPageServlet is the servlet and  MyPageServletPageDef is the page definition file which we created. First create the id for your pageDef file inside the tag <pageDefinitionUsage...

Improving the ADF Application Performance

Following are some of the important points to increase the performance of your ADF Application. 1. In view object tuning section always set the fetchSize to value which will be greater than the no of rows you are showing on the grid Because Default fetchSize is 1 with this fetch size for each row it goes to DB and fetch the records, that is one by one as shown in above diagram. I you want to increase the performance set some value for this fetchSize attribute so that it will fetch the rows in batches.      If you are showing 10 rows in a grid then in that ViewObject set fetchSize as 11 (row needed+1).  FetchSize is nothing but how many rows have to be fetched from DB in one trip.Using this no of Db trips will be reduced. 2. Remove unwanted bindings from pagedef and refresh conditions on iterator(only keep the required value of this property). 3. Activation and Passivation :     - when you run your ADF application first tim...

Collection in JAVA

Hi guys this post is specifically to give some introduction about collecton framework in java. Collection  :  Is an Interface in java and Collections : Is a class toString(), equal() and hashCode()  method introduction. 1.toString() : This method you can use if you want to read some meangifull text or data from your class.Overriding toString method ex. public String toString() {  return ("I am a Bob, but you can call me " + nickName + ". My shoe size is " + shoeSize);  } 2. "==" in java compares only the references to the object. But if you want to comapre the objects itselt then you need to use the equals() method. 3. equals() : use this method if you want to compare two objects of a class. ex. public boolean equals(Object o) {  if ((o instanceof Moof) && (((Moof)o).getMoofValue() == this.moofValue))   {          return true;  } else{    ...

ADF Application Module Pooling

1. An application module pool is a collection of application module instances of the same type. 2. This pool of application module instances is shared by multiple browser clients whose typical "think time" between submitting web pages allows optimizing the number of application module components to be effectively smaller than the total number of active users working on the system. 3. That is, twenty users visiting the web site from their browser might be able to be serviced by 5 or 10 application module instances instead of having as many application module instances as you have browser users. 4. As a performance optimization, when an instance of an application module is returned to the pool in "managed state" mode, the pool tracks session references to the application module. The application module instance is still in the pool and available for use, but it would prefer to be used by the same session that was using it the last time because main...

Passivation and Activation in ADF (Application Module )

1. For performance reasons, ADF keeps a pool of application modules in memory. It tries to give each session the same application module as the session used during the last request; however, this might not be possible during peak load of your application. 2. In this case, ADF saves the application modules state in a database table so the application module can be used by another session. This is called passivation . 3. When the first session needs the application module again, its state is retrieved from the database process known as activation . 4. If you have made an error in your code and depend on some variable that is not persisted correctly when your application module state is stored, you will experience mysterious errors under high load.   Enable/Disable Application Module Pooling : Right-click on your application module, choose Configurations.By default, each application module has two configurations. Ensure that the one ending in …Local is selected and then c...

Introduction to Application module

1.AM encapsulate the view object instances and business service methods necessary to perform a unit of work.   2.Each application module has its own transactional context and holds its own database connection. This means that all of the work a user performs using view objects from one application module is part of one database transaction.   3.Application modules can have different granularity, but typically, you will have one application module for each major piece of functionality.   4.If you wish, you can combine multiple application modules inside one root application module. This is called nesting and allows several application modules to participate in the transaction of the root application module. This also saves database connections because only the root application module needs a connection.     5. When a root application module contains other nested application modules, they all participate in the root application mod...