Saturday Aug 01, 2015

There is a new scroll policy for the table component in ADF 12c. This new policy is called - load more.
I think it gives good potential, it allows to reduce access load on
heavy tables. In ADF 11g we are implementing similar approach with
RowCountThreshold = -1 setting, this is preventing full scroll at once (How To Disable SELECT COUNT Execution for ADF Table Rendering). Load more is better, it integrates with VO Range Paging and allows to configure maximum number of rows present on the client. New scroll policy is configurable directly on the ADF UI table component, as a property:

Load more
works based on configured Range Size for the iterator in the bindings.
In my example, I have set it to be 15, this means there will batches of
new rows added in the groups of 15 elements: Read the complete article here.

Friday Jul 31, 2015

In
a SOA architecture there is often a need to create asynchronous
services. As a simple example imagine a workflow approval process. In
such a case the approval process can run from minutes to weeks, before
the final approval returned back to the client. This is a typical
example of an asynchronous service. So when a platform like Oracle SOA
Suite is involved the implementation of an asynchronous service is a
quite easy task to do. However when developing such a service manually
it is a challenging task. The primary challenge in this scenario is the
correlation between the request from the client and the response from
the service. In more detail the service have to notice at a minimum the

URL of the client

a unique identifier for the request (correlation id)

After
the service successfully processed the request it has to use this
information to build the response and send it back to the client. There
exists a web service standard used for correlation: WS-Adressing.

When
developing an asynchronous web service manually the developer has to
deal with a lot of requirements and standards. Edwin Biemond wrote a
nice blog about building a simple asynchronous web service with JAX-WS.

But
there exists an alternative using Oracle Fusion Middleware. In the
documentation there exists a book about creating Infrastructure web
services. In detail this means buildung web services with Oracle ADF.
When developing an asynchronous web service according to this guide,
Oracle prepares the infrastructure for correlation of the request and
response. The developer are able to concentrate on developing the
business logic for the service. The correlation of request and response
is automatically provided by the infrastructure. So afterwards the
preconditions and the general steps are described in more detail.

Preconditions

The
preparation of the infrastructure for asynchronous web services consist
of creating a request and response JMS queue in WebLogic Server. The
default queue names are as follows:

Request queue: oracle.j2ee.ws.server.async.DefaultRequestQueue

Response queue: oracle.j2ee.ws.server.async.DefaultResponseQueue

It
is also possible to change the names of the queues. In addition this
queues can be used in a cluster setup as well. Some best practices when
using this queues also provided in the documentation. The installation
is quite easy. It is only necessary to apply the template oracle.jrf.ws.async_template_12.1.3.jar
($ORACLE_HOME/oracle_common/common/templates/wls) when creating a new
WebLogic domain. An existing WebLogic domain can also be extended by
applying this template. Read the complete article here.

It
may look simple, but really is not obvious how to apply new label text
for the ADF BC attribute or UI component through MDS customisation. It
is simple, if such label text already exists in the core bundle. If you
need to create new label text in the customisation and use it - this
becomes a bit tricky. Well, as usual - I'm going to explain how you
could solve such task. You should read more about MDS customisation
setup in ADF - MDS Seeded Customization Approach with Empty External Project. Core application - mds_label_cust.zip,
contains one label for First Name VO attribute. The requirement is to
customise core application and add label for the Last Name VO attribute,
without changing anything in the core. For this purpose, we need to
create different JDEV application - extension, configured with shared
library deployment profile. Here you could simply create new properties
file. We are going to use this application to deliver additional
components for the core. Keep in mind - core application must be
configured to use this library. Add label for Last Name VO attribute, in
the properties file located in the extension: Read the complete article here.

Wednesday Jul 29, 2015

This post is next in series of "Working with ADF Faces Components programmatically" So this post is about creating client Attribute, applying it to component and setting it's value programmatically this
requirement comes in picture when user is dealing with dynamic layout
means components are created programmatically at run time and it is not
possible to apply clientAttribute and other properties declarative In this i am extending my previous post - Apply Client/Server listener to programmatically created components, apply JavaScript to ADF Faces components at run time In previous post i have described about applying client listener and server listener programmatically here we will see how to pass a variable value to java script function using client attribute You can read more about af:clientAttribute hereFrom oracle docs- The
clientAttribute tag specifies the name/value for an attribute which
will both be made available both on the server-side (Faces) component as
well on on the client-side equivalent. This tag will be ignored for any
server-rendered components, as it is only supported for the rich
client. ClientAttributes are not synchronized to the server since
unknown attributes from the client are not synchronized to the server. Lets' see how we can do this ,It's simple just check this code Read the complete article here.

Tuesday Jul 28, 2015

It doesn't seem to be announced, but newly released ADF 11.1.1.9 is shipped with Alta UI support. All you need to do, is to set alta
skin name in trinidad config file. This enables applications running on
ADF 11g platform to leverage new Oracle UI layout and to be prepared
for ADF 12c upgrade. Besides Alta UI, there are several new UI
components, one of them is Scrollable Bar (ConveyorBelt) - Displaying Components in a Scrollable Bar.
This is simple, but quite useful component - I'm going to demonstrate
how it works. Conveyor Belt is able to render elements horizontally or
vertically. This is perfect component to render key information, user
could select one of the items available on the belt and get more info
fetched. This is how it looks like - conveyor of employee pictures with
first/last names, rendered in the vertical belt on the left:

If
there are more items in the conveyor belt, than could fit into visible
UI part - user could scroll (right/left and down/up). Here I scroll down
and select another employee, his detail data is displayed in the main
section: Read the complete article here.

Sunday Jul 26, 2015

In Part 1
of his series on using Java ME 8 to control Internet of Things (IOT)
devices--such as LEDs, relays, LCDs, sensors, motors, and
switches--connected to a Raspberry Pi, Jose Cruz explained how to work
with devices that use a simple general-purpose input/output (GPIO)
interface. GPIO devices can be used as either a digital input or digital
output, can be disabled or enabled, and can be used to drive interrupt
lines. Part 1 explored how to connect and control a flame sensor, a
movement sensor, and a motion sensor.

In Part 2 of his series,
Jose describes how to connect and control devices that use an
inter-integrated circuit bus (I2C) interface, which is a multimaster,
multislave, single-ended serial computer bus that enables you to read
or write data beyond just changes in logic states.

Following Jose's instructions,
you'll learn how connect a servo driver; a temperature and humidity
sensor; a light and object proximity sensor; and a digital compass to
the Raspberry Pi. Then, you'll see how to develop Java ME 8 classes
that allow you to gather data from, write data to, and control these
devices. The code for the classes is very similar, so once you
understand it, you'll be able to create new classes that control
additional I2C devices to create your very own IoT world. Read the complete article here.

The
page contains a lot of useful NetBeans news, articles, and tutorials.
There are also great links to blogs and to useful NetBeans books.

NetBeans's
features and performance have always been productivity boosters. I have
always enjoyed coding with NetBeans. So, promoting NetBeans is a
regular activity of mine in activities such as craftsmanship meetings
and workshops.

Then I thought that the idea of creating a NetBeans
section on Zeef might be a great next step. Sharing my coding
experience with NetBeans users through an innovative platform as Zeef
was a successful step in spreading the great NetBeans experience.

The
NetBeans page is a very useful holder of links, books, articles &
tutorials that every NetBeans user needs to improve the NetBeans's
coding experience. Read the complete article here.

Wednesday Jul 22, 2015

Great
news to our fellows bleeding edge Java EE developers and GlassFish
users. We are now pushing two images of the application server to Docker
Hub to make it even easier to try new and upcoming releases. The
GlassFish organization is under registry.hub.docker.com/u/glassfish/, and here are the two images we have:

Monday Jul 20, 2015

This
article describes a Java EE 7 web application that exposes a REST
service that handles HTTP POST requests with JSON payload. Any message
received is sent through a Web Socket to the web socket (server)
endpoint that is published by a Java Class deployed as part of the web
application. A static HTML page with two associated JavaScript libraries
is opened in a web browser and has opened a web socket connection to
this same end point. The message sent from the REST service endpoint to
the web socket endpoint is pushed through the web socket to the browser
and used to instantly update the web page.

The specific use case
that is implemented is a simple web dashboard to monitor a movie
theater: the current number of people in each of the four rooms of this
movie theater is observed. The REST service receives the actual
spectator count and through the two web socket interactions, this count
ends up in the browser and in the visual presentation.

Below you
will find a step by step instruction for implementing this use case
including all required source code. The implementation uses only
standard technologies: Java EE 7 (including JAX-RS and Web Socket ) and
plain HTML5 and JavaScript – no special libraries are involved. The code
is developed in Oracle JDeveloper (12c) and deployed to Oracle
WebLogic (12c). However, given that only standard components are used,
the same code should work equally well on other containers and from
other IDEs.

Note: for the use case presented in this article, a
somewhat simpler solution would be possible using Server Sent Events
(SSE) – a simpler and lighter weight approach than the use of web
sockets. SSE is uni-directional (server to client push only) and that of
course is exactly what I am doing in this particular example.

The steps will be:

· Implement the REST service to handle json payloads in HTTP Post requests

· Implement the WebSocket endpoint

· Interact from REST service endpoint with WebSocket (endpoint)

·
Implement the HTML and JavaScript web application to present the live
status for the movie theater based on the web socket messages

The starting point is a basic Java EE web application – with no special setup in web.xml or other files.