Web/Java
Knowledge Center Web and Java
Hands-on: Synchronize your database from a webservice with JAX-WS and ADF Business Components
0This 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-WSWe are going to create a webservice client proxy for a country webservice available on: (more…)
ADF 11g : Adding a Keystroke Filter to an ADF Shuttle Component
1Recently I had to implement a selectManyShuttle Component with a filter on it. Filtering a selectManyShuttle Component has been described many times so that is no rocket science. However, this implementation asked for a keystroke filter. The user enters a value, and the shuttle is filtered immediately.
In this post I describe how to implement this feature. (more…)
Oracle Diagnostics Logging (ODL) for application development
1Logging is a very important aspect of application development as it offers run-time access to the behaviour and data of the application. It’s important for debugging purposes but also to investigate exception situations on production. The Java developer has a choice between logging frameworks but Log4J is probably the most used one. The usage is quite simple: grab a Logger, e.g. private static Logger log = Logger.getLogger(MyBean.class);, and then use that logger to log the actual message at the required level, log.debug(“This is a debug message”);. To print the logmessages, the Log4J is configured externally with a properties file that defines the location (e.g. console, file, database etc.) and the format of the logmessages. Other logging frameworks, like Java Util Logging, are used in a similar way. It’s actually a good practice to not use Log4J directly, but to use a wrapping or facade framework, that allows switching of the actual logging implementation itself. In the past that would have been Apache Commons Logging (ACL), but now SLF4J is commonly used because it doesn’t have the classloader issues of ACL and it provides some nice message formatting (and performance) More >
ADF 11g : Log Data Manipulation
6Today 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 (more…)
ADF 11g : Drag’n Drop and Contextual Events
0While going through my list of requirements for our AMIS re-usable ADF taskflow library, I ran into the following requirement: publish a contextual event on a Drag and Drop action. If you know contextual events, you immediately notice that there is no way to publish a contextual event from a Drag and Drop action. There are two types of events: ADF Binding Type events or JSF Component Type Events such as actionEvents, valueChangeEvents or clickEvents (also called eventBindings). However none of those is directly related to Drag and Drop. With some knowledge of the ADF Framework you will be able to create contextual events anyway. This post describes how to publish contextual events when a Drag and Drop action occurs. (more…)
ADF 11g : Change a Viewobjects’ Query on the Fly
1One of the requirements at my current project is to have one ADF table display data from different database tables. That is, depending on criteria entered by the user, the query behind the view object needs to change. All in all 12 different database tables are involved in this story. This requirement is based on functionally in the original (oracle forms) application. This forms application used the set_block_property built-in:
set_block_property('<blockName>, query_data_source_name, <datasource>);I was able to reproduce this behavior in an ADF application. In this post I explain how I did this (more…)
Recent Comments