Posts tagged adf bc
Synchronize ViewObject Queryies by dynamically linking bind parameters
Nov 28th
The functional requirement for my ADF application was fairly simple: the values used for the bind parameters in one ViewObject should be reflected for a second ViewObject. In more functional terms the requirement was the following: when we filter the master records – Employees – by begin year and end year (to only show employees that were hired between the begin and end year) the details – Job History – should also fall within the perioded limited by begin year and end year. The end users complained that when they had set the begin year and/or the end year, they did not like to get job history records that were completely outside that range (even though stricly speaking that is correct).
A similar requirement would be for example when a page shows both orders and complaints for a specific customer and the orders are filtered by date to also have the complaints filtered by that same date.
It is possible to resolve this in the web tier – to retrieve the value of the bind parameters for both ViewObjects from the same bean property. However, when the model based query component is used, the value of the bind parameter is not readily accessible from the web tier.
Fortunately, and often easier to realize, the value of one bind parameter can be bound to a bind parameter on a different ViewObject.
Hands-on: Synchronize your database from a webservice with JAX-WS and ADF Business Components
Mar 27th
This step-by-step starter hands-on provides an example how to make a JAX-WS webservice proxy in JDeveloper, and save retrieved data from this webservice in a batch-job to your own database with ADF Business Components.
Duration: 60 minutes.
For this hands-on example, imagine that your company wants to expand internationally and that reliable, up to date country information is absolutely critical. Recently there were some changes in the number of countries and there might be in the future. Since 1990, 33 new countries have been created. A few months ago the world welcomed a new country (South-Sudan) and yet we don’t know what will happen in Libya (maybe it will be separated in West and East-Libya?). Your company wants to weekly synchronise its internal countries database table with up-to-date country information from a recognised country-monitoring institution that delivers up-to-date country information by a webservice.
Part 1 – Create the country webservice client with JAX-WS
We are going to create a webservice client proxy for a country webservice available on: Read the rest of this entry »
ADF 11g : Log Data Manipulation
Jan 6th
Today I had a request to implement a generic logging mechanism for all changes of data (DML) in an ADF application. The log needs to be persisted in a database table. This application uses ADF-Business Components and an Oracle Database. My first idea was to use database triggers for all tables (insert, delete, update for each row) and write the data to a log table. However that was not generic enough because this has to be implemented on every new table. I had to come up with an ADF solution. It’s basic, no rocket science, but useful Read the rest of this entry »
Adding a custom method in an ADF BC Service Interface – update of a single attribute in a selected row
Dec 30th
The article “Quickly creating, deploying and testing a WebService interface for ADF Business Components” (http://technology.amis.nl/blog/9726/quickly-creating-reploying-and-testing-a-webservice-interface-for-adf-business-components) that I recently published describes a way of very rapidly creating the HRService Web Service – an ADF BC driven WebService on top of the EmployeesView ViewObject that exposes the EMPLOYEES table in the HR schema through the Employee EntityObject. However, that article’s true purpose is to show how to create the deployment profile and deploy and test this service, either on the integrated WLS or on a standalone WebLogic Server, in the easiest way possible. This article is an extension of the previous one: it demonstrates how to extend the Service Interface with a custom method (or an operation in terms of WebServices).
As it happens, I required an operation for updating just the salary of an Employee. I will show how I create a custom method in the Application Module’s implementation class, how I added this method to the Client Interface of the Application Module and subsequently to the Service Interface. After redeploying – using the same deployment profile that was created previously – we can test the updateSalary method as a new operation in the WebService.
Quickly creating, deploying and testing a WebService interface for ADF Business Components
Dec 29th
As you probably already know, ADF Business Components can very easily be exposed through a WebService interface. An Application Module can be configured with a Service Interface, ordinary ViewObjects and custom methods can be exposed in that interface and deployment is relatively straightforward. In minutes, a WebService can be published that exposes operations based on regular ADF BC functionality. This may well give us the fastest way to provide data services on top of a relational database. Several excellent articles have been published on the ADF BC service interface, for example by Steve Muench and Andrejus Baranovskis.
The blog-article you are reading is created as the result of my research and investigations around an article I hope to publish in Oracle Magazine later in 2011. It is adamant for this article that readers can get the example to work with the smallest number of instructions possible – both to make their life easy and to save on words. The article describes a BPM process that interacts with the HR schema of an Oracle RDBMS as one of its activities. The focus in the article will be on BPM, not on exposing data services for the HR schema. The WebService should therefore be available in a starter application, and be deployable without any fuzz or configuration overhead.
This blog-article demonstrates how to rapidly create the HRService – an ADF BC driven WebService on top of the EmployeesView ViewObject that exposes the EMPLOYEES table in the HR schema through the Employee EntityObject. However, its true purpose is to show how to create the deployment profile and deploy and test this service, either on the integrated WLS or on a standalone WebLogic Server, in the easiest way possible. Note that this easiest way is not the suggested way of working for real production environments.
This article assumes – in case you want to follow along for yourself – that you have JDeveloper 11g PS2, Oracle RDBMS 10gR2 or later with the HR sample schema and the SOA Suite 11g Run Time environment.
Oracle ADF 11g training
Mar 26th
(note: click here for details in English about the AMIS 5 day ADF 11g training)
Ga hier naar onze actuele Oracle ADF 11g training.
In oktober kwam na bijna twee jaar van aankondigingen en previews de productieversie van JDeveloper en ADF 11g. Nu, op 20 april, vindt de première plaats van de ADF 11g training die AMIS in nauwe samenwerking met SAGE Computing Services, Australië (van ondermeer Oracle ACE Director Chris Muir) heeft ontwikkeld – op basis van een half jaar praktijkervaring volgend op anderhalf jaar aan experimenteren, onderzoeken en publiceren.
De training is gericht op ontwikkelaars die in de praktijk aan de slag willen gaan met ADF 11g. Wil je meer weten over deze training, ga dan naar 5-daagse ADF 11g Training.
Ben je al ervaren met ADF 10g maar wil je wel graag met ADF 11g aan de slag? Dan kan je ook naar onze Masterclass ADF 11g Upgrade komen waarin we in één dag de nieuwe thema’s, functies en manier van werken met ADF 11g bespreken, in vergelijking tot de 10g release. Deze Masterclass vindt voor het eerst plaats op 14 april, in Nieuwegein en 18 mei, in Parijs (in samenwerking met Oracle University). Zie Masterclass ADF 11g Upgrade voor meer details.
RESTful service based on ADF Business Components, publishing enterprise database contents the REST way
Oct 16th
After three introductory and exploratory articles on RestLet, RESTful Services and the creation of the latter using the former in JDeveloper 11g as well as hooking it up with ADF, it is now time to create a more serious RESTful service. A service that exposes resources from an enterprise business service. One backed by a enterprise database. One that RESTfully provides access to the Human Resource data. In other words: we will publish RESTful services for DEPT and EMP in the SCOTT schema.
It really is simple. The steps are:
- create default ADF BC business objects for the DEPT and EMP tables; this implicitly publishes a Data Control that exposes the data collections
- create a new JSF page; drag the EMP table to this page and drop it as master-detail (table-table); this implicitly creates a PageDefinition that fuels the BindingContainer we need for our services
- create and configure a servlet filter that will take care of initializing the BindingContainer on every request
- create Resource classes for Depts, Dept, Emps and Emp; these classes get the appropriate data binding from the BindingContainer, set the current row for Dept (all resources except Depts) and Emp (only for the Emp resource) and write the XML representation of the desired data
- attach routes for all resources using appropriate URLs (/depts, /depts/{deptno}, , /depts/{deptno}/emps, /depts/{deptno}/emps/{empno}
- deploy the Web Application and access the RESTfule services from a browser or other Http-client
Let’s take it one step at a time:
Read the rest of this entry »
The rise of the ViewObject – or: isn’t the ViewObject the real Data Control?
Oct 15th
The ADF Model is positioned to decouple the Application from the implementation details of the Business Service(s) it uses. Any Business Service, be it an EJB, a POJO based JPA implementation, a WebService, a plain URL service (RESTful or otherwise), a Content Management API or an ADF Business Components Application Module, can be published as a Data Control through the ADF Model and from there be used in Data Bindings. The application deals with Data Bindings, the ADF Model layer interfaces with all different business service technologies. Sounds good. However: some business service technologies are more equal than others. Or to be more exact: one is more equal than others. ADF Business Components enjoys far more privileges in the ADF Model layer than the other persistence and implementation technologies do. Read the rest of this entry »
Integrating Flashback in ADF Web Applications – providing the historic perspective
Jun 20th
When we were doing the APEX vs. ADF session at the last day of the ODTUG Conference yesterday, Dimitri showed a nice feature in APEX that allows you to use Oracle Flashback Queries to look not just at table data as it is right now, but also as it used to be in the recent past. That inspired me to see how easy it would be to do something similar for an ADF application. As an example of what you can do, I will create a simple web page in this article that will show an editable table with Employee records and below that a read only table that can show the data as it is right now, or as it was at some specific time in the last. Through a dropdown list, the user can select from which point in time the data should be retrieved. It allows for quick inspection of changes in data and could serve as a basis for recovering data
Read the rest of this entry »


