Sunday Sep 01, 2013

Think TV is boring? Think again!

Since July, I have been busy contributing to an exciting new initiative from Oracle. Our aim is simple: to revolutionize TV! While Apple's infamous iTV is still little more than a rumor, we are delivering! Ok. Maybe I got a little carried away... Anyway, if you are an ADF architect or developer, you really should  check our ADF Architecture TV channel on YouTube. There, you will find a series of weekly episodes which will help you learn ADF design and best practices from key Oracle ADF specialists. This is real, deep technical content; not marketing fluff. Make sure you subscribe as we have over 100 episodes planned covering security, web services, PL/SQL integration, UI design and much more! This week's episode was recorded by Frank Nimphius and is about Task Flows. 

The episodes I recorded are about internationalization. There are five of them and cover resource bundles, character encoding and time zone management, among other things. I will let you know when they are released. 

Who would have thought TV could get this interesting? Here is the official trailer for the channel:


Monday Jul 29, 2013

JDeveloper 12c and Maven: Using relative paths in your POM files

One of the greatest things about JDeveloper 12c is the significantly improved support for Apache Maven. By default, the POM files produced by my favorite IDE contain some absolute paths, such as the folder for the ojmake/ojdeploy executables and references to project (.jpr) and application (.jws) files. Here is a sample of such paths extracted from an application I created on a Windows machine.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
      <plugin>
        <groupId>com.oracle.adf.plugin</groupId>
        <artifactId>ojmake</artifactId>
        <version>12.1.2-0-0</version>
        <configuration>
          <ojmake>
            C:\Oracle\Middleware1212\jdeveloper\jdev\bin\ojmake.exe
          </ojmake>
          <files>
            C:\OracleData\JDEV_USER_DIR\mywork\MavenTest\Model\Model.jpr
          </files>
          <usemaven>
            true
          </usemaven>
        </configuration>
        <executions>
          <execution>
            <phase>compile</phase>
            <goals>
              <goal>compile</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

This is perfectly fine if your development team uses workstations that are configured in a consistent way and run under the same operating system. It is often not the case in the real world. Fortunately, Maven provides features that make it very easy to use relative paths instead.

The first thing you should know is that Maven supports the use of variables in POM files. Those variables are always referenced using the following syntax:

${variable_name}

There are several built-in variables provided by Maven. One of them is ${basedir}, which points to the folder where the current POM is located. In addition, Maven can access any environment variable defined by the operating system. This is achieved though the following syntax:

${env.variable_name}

 Thus, it is possible to remove all absolute paths from the sample above by using ${basedir} and referencing an environment variable. Suppose I created such a variable named OJ_HOME, which points to  C:\Oracle\Middleware1212\jdeveloper\jdev\bin. Then, the POM would look like this:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
      <plugin>
        <groupId>com.oracle.adf.plugin</groupId>
        <artifactId>ojmake</artifactId>
        <version>12.1.2-0-0</version>
        <configuration>
          <ojmake>
            ${env.OJ_HOME}\ojmake.exe
          </ojmake>
          <files>
            ${basedir}\ViewController.jpr
          </files>
          <usemaven>
            true
          </usemaven>
        </configuration>
        <executions>
          <execution>
            <phase>compile</phase>
            <goals>
              <goal>compile</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

This POM will run on any workstation, granted the OJ_HOME variable is set to a suitable value.

Thursday Jun 20, 2013

Saved by the local database!

In my last post, I told you about my latest ADF Insider Essentials recording on the local database, and pointed you to the companion code sample. I had lots of feedback about both. I am glad to see I have so many viewers and readers!

Among all the questions I got, one was asked very frequently: « How can I transparently retrieve data from the database when a web service call fails? » In other words: how can the local database save my life if the web service doesn't respond? This is a bit different from what I had implemented initially. Thus, I built a new version of the sample application which does exactly that. In the original sample, the code simply detected the presence or absence of a network connection; an available connection meant the web service call was assumed to succeed. Otherwise, an exception was raised and displayed to the user. Thus, the key change to obtain the desired behavior is simply to catch the exception. Then, it is easy to invoke the method that retrieves data from the database instead.

Here is the relevant method in the sample application.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
    private CountryBO[] getCountriesFromWS() {
        try {
            GenericType genericReturnValue =
                (GenericType)AdfmfJavaUtilities.invokeDataControlMethod("HR_WS", null, "findCountry", new ArrayList(),
                                                                        new ArrayList(), new ArrayList());
            CountryBO[] returnValue =
                (CountryBO[])GenericTypeBeanSerializationHelper.fromGenericType(CountryBO[].class, genericReturnValue,
                                                                                "result");

            Arrays.sort(returnValue);
            return returnValue;

        } catch (AdfInvocationException aie) {
            if (AdfInvocationException.CATEGORY_WEBSERVICE.compareTo(aie.getErrorCategory()) == 0) {
                AdfmfContainerUtilities.invokeContainerJavaScriptFunction("oracle.adfinsider.localdb.countries",
                                                                          "navigator.notification.alert",
                                                                          new Object[] { "The web service is unavailable. \n\n Data has been retrieved from the local cache.",
                                                                                         "null", "Warning", "Ok" });

                return getCountriesFromDB();
            } else {
                throw new RuntimeException(aie);
            }
        } catch (Exception ex) {
            Utility.ApplicationLogger.severe(ex.getMessage());
            throw new RuntimeException(ex);
        }
    }

Another nice thing this code snippet demonstrates is how to call JavaScript code from Java business logic. At line 15, I invoke a method which is part of the Apache Cordova library to display a warning message to the user. Cordova is an integral component of ADF Mobile, but your AMX pages must be properly configured in order to use it. I added the proper references to the countriesList.amx page like this:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
  <amx:panelPage id="pp1">
    <amx:verbatim id="v1">
        <script type="text/javascript">if (!window.adf) window.adf = {}; adf.wwwPath = "../../../../www/";</script> 
        <script type="text/javascript" src="../../../../www/js/base.js"></script>
        <script type="text/javascript" src="../../../../www/js/cordova-2.2.0.js"></script>
    </amx:verbatim>
    <amx:facet name="header">
      <amx:outputText value="#{viewcontrollerBundle.COUNTRIES}" id="ot1"/>
    </amx:facet>
...
  </amx:panelPage>

I placed the script references (lines 3 to 5) inside a verbatim tag, which ensures that they will be rendered as is in the page.

While I was at it, I fixed a few other issues with the sample. In the original version, the database connection was closed inside the stop() method of the LifeCycleListenerImpl class. The stop() method is usually called when the use exits the application; there is no guarantee, however. Thus, the connection wouldn't be closed properly in some corner cases. To fix this, I moved the code to the deactivate() method, which doesn't suffer from the same drawback and will be called each time the user switches to another application. This is much better, as the connection will be properly closed even if the device crashes while the application is inactive.

You can download the refreshed sample application here

Friday May 17, 2013

See the ADF Mobile local database in action

ADF Insider recordings are probable one of the best parts of my job. They are a lot of work, sure. But they are lots of fun to do and join so many members of the ADF Community... 

My latest recording is on the ADF Mobile local database. In it, I explore the various aspect of the feature and devote a healthy chunk of time to the management of the database file. The slides contain a few selected code snippets, but I thought it would be better to build a sample application to fully illustrate the concepts. In particular, I wanted to show how it is possible to retrieve data from either a web service or the local database while binding the UI to a POJO Data Control. 

My sample application  is made is made of two distinct components: 

   - A simple SOAP web service (SDO view object) built on the top of the HR database schema. 

   - The ADF Mobile application itself, that demonstrates local database techniques and calls the web service when a network is available. Data is fetched from the local database when their is no connectivity.

I contributed the application to the ADF Enterprise Methodology Group samples repository. It is not listed on the web pages right now, but you can download it from the following location:

https://svn.java.net/svn/smuenchadf~samples/ADFMobileLocalDatabase.zip

My recording is available on our YouTube channel here: http://www.youtube.com/watch?v=-XzE1n_j5Nc

Monday May 06, 2013

From Russia with Java: answering the most frequently asked questions

Last week, I had the wonderful opportunity to visit Moscow and meet fellow Java developers. I was one of the presenters at the JavaOne Russia 2013 conference, on April 23 and 24. There, I talked about ADF, ADF Mobile and even forms. I was even able to spare a few hours for sightseeing...

When not presenting, I passed most of my time at the ADF Demo booth, where I fielded lots of interesting questions from attendees. Since some of these questions were asked quite frequently, I thought it would be interesting to answer them here.

  1. How do I get a license for ADF Mobile?
    Maybe you don't even need to buy anything! Isn't this great?

    ADF Mobile is bundled with ADF. Currently, there are two ways to license ADF: on its own or through a WebLogic Server license. If you buy named user licenses, you can distribute your ADF Mobile applications to those same users on the devices they own. On the other hand, you can distribute your applications to an unlimited number of users and devices if you buy a processor license. Thus, a processor license is your best bet if you plan to distribute your applications through the Apple and Google Play stores.

    If you hesitate between named user licenses and the processor license, the latter will be more advantageous if you have around 50 users or more. I am not in sales, and prices in your regions could affect the value equation so please check with a sales representative. 


  2. What is the difference between ADF, ADF Mobile and ADF Mobile Browser?
    Oracle Application Development Framework (ADF) is the toolkit at the core of Fusion Architecture. Through the ADF Faces set of components, it enables you to build rich and scalable web applications for desktop and high-end mobile devices (such as Apple's iPad), and can be used to build SOA backbones that will be accessed by Swing and JavaFX applications, among others. You can even integrate ADF back-ends in Microsoft Office through ADF Desktop Integration. ADF is built from the ground up for easy integration with the other components of Fusion Middleware, such as Oracle WebCenter and Oracle SOA Suite.

    Oracle ADF Mobile enables you to build Java applications that will run directly on most current iOS and Android devices. Its model and controller layers provide a developer experience very close to the ADF one. ADF Mobile applications can consume standards-based web services and work very well with ADF SOA back-ends.

    Oracle ADF Mobile Browser is a set of JSF components that you can use instead of the regular ADF Faces components to create web applications that target a wide variety of mobile devices. The pages produced will gracefully adapt to the device's capabilities in order to deliver the richest user experience possible.


  3. Oracle has got JDeveloper, Netbeans and Oracle Enterprise Pack for Eclipse. Why do you have so many IDEs?
    Exactly for the same reason your favorite car brand offers several models: because not everyone has got the same needs.

    Netbeans is the perfect complement to the GlassFish Application Server, which is the reference implementation for Java Enterprise Edition. Thus, it will be your IDE of choice if you want to benefit from the latest advances in that space. Moreover, Netbeans provides unparalleled tools for JavaFX applications.

    Oracle Enterprise Pack for Eclipse (OEPE), on the other hand, shows Oracle's commitment to the current market share leader in Java IDEs. Oracle has been a member of the Eclipse Foundation for a long time and contributes to at least ten distinct Eclipse subprojects. In the last few years, OEPE has added support for a number for Fusion Middleware technologies such as Oracle ADF. Thus, you can build Fusion Architecture applications using an IDE you already know and love.

    Finally, Oracle JDeveloper is the best development environment for building Fusion Architecture application. With deep support for both other Fusion Middleware products and Java Enterprise Edition technologies, it focuses on developer productivity. JDeveloper is heaviliy used internally at Oracle, especially by the Fusion Applications team.

  4. When will JDeveloper 12c be out?
    I wish I could tell you! Unfortunately, revenue recognition rules in the US prevent us to provide a better answer than « sometime this year » The product team is working very hard on it as I write this. 12c will be a very nice release, and the internal builds I used recently show great promise. 

I hope you found my answers useful. During my flight back home, I got a fortune cookie with my meal. I got two prophecies and really hope they will come true...

Friday Apr 19, 2013

ADF Mobile and SDO: getting results

In my previous post, I explained how to make web service calls to SDO view objects exposed through a service-enabled application module. So far, so good. What I didn't explain is how you can access the return value of the service call if there is one. The answer is straightforward... once you figured it out.

 Our starting point, once again, is JDeveloper's Data Control palette.

As you can see,  the name of the return value is result. Consequently, one could be tempted to use GenericTypeBeanSerializationHelper to convert the value. And one would be right. Even better: you don't have to worry about the type name exposed by the data control as with input parameters. Here, I simply retrieve the results of the call in VisitResultBO, which is a simple POJO. 

GenericType genericReturnValue =
    (GenericType)AdfmfJavaUtilities.invokeDataControlMethod("VisitsWS", null, "getVisit", 
                                                            namesList, paramsList, 
                                                            typesList);
Object returnValue =
    GenericTypeBeanSerializationHelper.fromGenericType(VisitResultBO.class, 
                                                       genericReturnValue,
                                                       "visit");

What makes it not obvious is that the fromGenericType method has got two signatures: 

fromGenericType(java.lang.Class beanClass, GenericType gt)
fromGenericType(java.lang.Class beanClass, GenericType gt, java.lang.String attributeName)

For SDO web services, you absolutely need to use the second form and pass "result" as the value for attributeName. I must admit it took me some time to realize this. 

Tuesday Mar 19, 2013

ADF Mobile and SDO: making the connection

One of the great difficulties in building a mobile application is building a strong web service back-end. If you are using ADF BC as your data access layer, service-enabled application modules are a compelling option. My good friend Frank Nimphius published an article in Oracle Magazine on that very topic, titled Consume Early; Consume Often

In the perspective of an ADF Mobile application, the web service methods exposed by the SDO interfaces of ADF BC view objects are accessed through the web service data control. It is worth remembering that, at this point, SDO interfaces can be reached through the SOAP protocol only. Support for REST interactions is currently planned for ADF 12c. Fortunately, the WSDL description for the service is generated by JDeveloper.

It is possible to bind directly your AMX pages to the web service data control. Shay Shmeltzer has posted a few blog entries where he uses this technique, even for calling web services with complex parameters. Some use cases, however, can be implemented more cleanly by calling the web service data control in Java code, which implies the page is bound to a bean or to a POJO-based data control. But how does one invoke the web service data control from code?

The first step is to look at the structure for the data control. Suppose I want to call the createVisit method exposed by the VisitsWS data control. The method accepts a single input parameter of type java.lang.Object

Calling the method with any random object will not work. The data control expects an object of a very specific type, with attributes matching its own definition. It is possible to determine the name of the type expected by the data control by hovering above the parameter with the mouse pointer, as shown in the screenshot below.

VisitsWS.Types.createVisit.visit is not implemented through a Java class; it is a virtual type managed by the data control. In ADF Mobile, the web service data control, when operating over the SOAP protocol, requires parameters to be passed as instances of the oracle.adfmf.util.GenericType interface. The only way to instantiate such objects is to use the GenericTypeBeanSerializationHelper class provided by the framework.  This class will transform POJO instances to and from GenericType.

Below is a  code sample that shows how to build the GenericType and  invoke the web service through the data control.

Visit visit = new Visit();

// Set attribute values for visit here.

List namesList = new ArrayList(1);
List paramsList = new ArrayList(1);
List typesList = new ArrayList(1);

GenericType gtVisit = GenericTypeBeanSerializationHelper.toGenericType("VisitsWS.Types.createVisit.visit", visit);

namesList.add("visit");
paramsList.add(gtVisit);
typesList.add(Object.class);

try {
    AdfmfJavaUtilities.invokeDataControlMethod("VisitsWS", null, "createVisit", namesList, paramsList, typesList);
} catch (AdfInvocationException ex) {
    // If the web service is not available throw a nice exception
    if (AdfInvocationException.CATEGORY_WEBSERVICE.compareTo(ex.getErrorCategory()) == 0) {
        throw new RuntimeException("Error with the server. Please try later.");
    }
}

There are a few things you should take into account when creating your POJO objects.

  • The attributes must have the same name as the data control attribute they are mapped to. 
  • The attributes must preferably be of type java.lang.String. Other types may work, but you may run into problems.
  • When manipulating dates, it is essential to express them in the ISO-8601 format expected by the SOAP service layer. This can be achieved through the oracle.adfmf.misc.ISO8601DateTimeUtil class.
  • If the service you invoke is based on a view object that contains attributes retrieved through a join that are marked as a reference, your POJO must declare these attributes as transient. This way, no values will be transmitted back to the server in the case of create and update operations. Failing to do so will raise a JBO exception on the server.  

By the way, if you found this post interesting, one of the two presentations I will make at the ODTUG Kaleidoscope 2013 conference in June will show you how to build flexible and SOA-compliant back-ends using Oracle ADF. See you in New Orleans! 

Monday Feb 25, 2013

ADF Mobile on BlackBerry 10: a failed but instructive experiment

With the release of their new handsets and operating system, Blackberry occupied lots of media space recently. This prompted me to have a deeper look at their platform and to experiment a bit in relation to ADF Mobile. You shouldn't read anything in this, by the way; my personal curiosity doesn't foreshadow Oracle's strategy. 

The BlackBerry 10 OS, as you may know, is able to run most Android applications through a runtime which supports about 70% of Android's APIs. Just for the sake of it, I tried to repackage a very simple ADF Mobile application and deploy it on the BlackBerry 10 simulator. Deployment was successful, and I was even able to get past the splash screen. It is only then that the application failed with an error message stating « Network_ERR: XMLHttpRequest Exception 101 ». This application is self-contained and didn't call any web services, by the way. The root cause of the error was obviously something else.

To be truthful, I expected the experiment to fail. The Android toolkit provided by BlackBerry contains an executable that scans APKs (packaged Android applications) for compatibility. When I ran it on my ADF Mobile APK, it flagged various minor problems (since we are using various hardware features) as well as a major issue: the presence of native code. You can see the full output below:

Apk2Bar /Verifier version 1.5.1
Research In Motion Ltd ? 2012 All rights reserved.
[osname.apk]:(res/drawable-xhdpi/adfmf_icon.png) found an alternate icon with better size:impact=1
[osname.apk]:(AndroidManifest.xml) uses-feature: android.hardware.camera:required minimal Tablet OS version=2.1:impact=2
[osname.apk]:(AndroidManifest.xml) uses-feature: android.hardware.telephony:required minimal Tablet OS version=10.0.6:impact=2
[osname.apk]:(AndroidManifest.xml) uses-feature: android.hardware.camera.autofocus:required minimal Tablet OS version=10.0.9:impact=2
[osname.apk]:(AndroidManifest.xml) native-code: armeabi:impact=5
[osname.apk]:(com/phonegap/AudioHandler.java:275) uses method: android.media.AudioManager$setRouting:impact=1
[osname.apk]:(com/phonegap/AudioHandler.java:272) uses method: android.media.AudioManager$setRouting:impact=1
[osname.apk]:(com/phonegap/AudioPlayer.java:193) uses method: android.media.MediaPlayer$setAudioStreamType:impact=1
[osname.apk]:Summary: [5]=1; [4]=0; [3]=0; [2]=3; [1]=4;
Summary: [5]=1; [4]=0; [3]=0; [2]=3; [1]=4;
Impact Legend: [5]=Severe; [4]=High /context; [3]=Medium /context; [2]=Medium-low /context; [1]=Minor;

The offending native code is part of the JVM that we package with the application itself. Therefore, there is nothing we can do to circumvent the issue right now. Further releases of ADF Mobile could replace the current JVM, thus creating more favorable conditions for this to work.

I must say I was impressed by the developer tools provided by BlackBerry (formerly Research in Motion), especially the device simulator. Its boot time is an order of magnitude shorter than the Android Emulator's, and it was a joy to use.

Does your organization plans to get BlackBerry 10 devices? Is this new platform a more interesting target than Windows Phone? Let us know!   

 

Wednesday Feb 13, 2013

Evaluating EL expressions the Java way in ADF Mobile

Expression language (EL) is used all over the place in JSF and ADF Faces, since it enables the presentation layer (JSPX / JSF pages) to communicate with the application logic (managed beans). ADF Mobile uses exactly the same pattern with its AMX technology, which delivers a JSF-like development experience to build an HTML5-based user interface. The key point here is JSF-like, since internal implementation details may vary between the two.

It is sometimes useful to evaluate EL expressions in the managed bean itself rather than delegate the task to the page. Typically, in ADF web applications, this is done like this:

import javax.el.ELContext;
import javax.el.ExpressionFactory;
import javax.el.ValueExpression;
import javax.faces.application.Application;
import javax.faces.context.FacesContext;


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);
}

This code snippet will not work as is in ADF Mobile, since there are no FacesContext or Application objects.

Sure, you could retrieve the expression factory by doing this:

import oracle.adfmf.framework.api.AdfmfJavaUtilities;
import oracle.adfmf.framework.model.AdfELContext;

AdfELContext ctx = AdfmfJavaUtilities.getAdfELContext();
ExpressionFactory factory = ctx.getExpressionFactory();

But ADF Mobile provides helper methods that will retrieve the context and expression factory behind the scenes for you.  For example, if you want to evaluate in Java an EL expression that retrieves a message (key ERROR_MSG) from a ressource bundle (declared as viewcontrollerBundle):

import oracle.adfmf.framework.api.Model
import oracle.adfmf.framework.contract.adf.NameValuePair;
...
Model mod = new Model();
NameValuePair[] result = null;

result = mod.getValue(new String[] { "#{viewcontrollerBundle.ERROR_MSG}" });
String value = (String)(result[0].getValue());

The code above will work out of the box if the AMX pages referencing the bean declare the bundle. If that's not the case, you must simply add this line of code before calling getValue on the Model object:

mod.loadBundle(<resource_bundle_basename>, <var_attribute>);

How would you use this technique in a real-world scenario? Suppose, for example, that you need to bind a single amx:outputText to several different values in a resource bundle, the specific text string to be displayed being determined at runtime. In ADF web applications, you could use nested EL to achieve your goal:

#{viewcontrollerBundle[<EL_expression_for_bundle_key>]}

This doesn't work in ADF Mobile currently. Thus, you can sidestep the issue by creating a method binding on a bean and reference it in the page. 

Monday Feb 04, 2013

ADF Mobile: Checking the operating system's name

Recently, somebody asked on the OTN forums how to check the name of the operating system from an ADF Mobile application. This is useful in order to provide a user experience better tailored to a specific mobile platform, for example. 

The first idea I had was to query the JVM's built-in properties: 


System.getProperty("os.name")

This, however, returns Linux on an Android device. This is not surprising, as Google's mobile OS uses the Linux kernel as its foundation. On the other hand, this answer lacks specificity. How can we get a better one?

Turns out  the most reliable way to achieve this task is to use the DeviceManager interface, which supports the DeviceFeatures data control. 


DeviceManager device = DeviceManagerFactory.getDeviceManager();
String os = device.getOs();

The code sample above will return Android as expected on my device.

ADF Mobile and resource bundles

In my last post, I described the three bundle types available to ADF Developers. Last week, I learned that the ADF Mobile framework doesn't support all the choices offered by its server-side older brother. Only XLIFF bundles are available in the current version. You can read more about this here.

Sunday Jan 20, 2013

Internationalization: which bundle type is right for you?

Choice is one of the fundamental tenets of JDeveloper's approach to development. This probably explains why so many people on the OTN forums and the ADF Enterprise Methodology Group ask for guidance on picking the best alternative to handle specific use cases. Most of the time, the answer will start with: Well... It depends. Developer skills, functional requirements, performance expectations and other variables make it difficult to come up with a single, straightforward recommendation. This is the case with resource bundles. 

In the context of the Java platform, a resource bundle is simply a collection of objects related to a specific locale. Each object can be retrieved by its key, which must be unique among all the bundles available to an application. When a program needs a locale-specific resource, such as the string for an error message, it can load it from the resource bundle that is appropriate for the current user's locale. This mechanism allows you to write programs that can:

  • be easily localized, or translated, into different languages
  • handle multiple locales at once
  • be easily modified later to support even more locales
    Source: Javadoc for the ResourceBundle class. 

JDeveloper supports three different types of resource bundles: Java classes, .properties files and XLIFF files. All three behave exactly in the same way at runtime; choosing one type or the other will be completely transparent to the end user and will not likely impact performance or resource usage in a well-designed application. Why would you pick one type over the other, then?

[Read More]

Thursday Jan 03, 2013

The slow JDeveloper startup mystery

I am currently producing my first ADF Insider session. It contains a few recorded demonstrations, which I did using an Oracle Enterprise Linux 6.3 virtual machine. I was pleased by the performance and polish of the OS, and recording was a breeze. If only JDeveloper hadn't been so slow to start...

Now, some of you will probably tell me this is business as usual. This is unfair. Since the first 11g release in 2007, JDeveloper's performance has improved steadily. Bex Huff also gave very effective advice on his blog on how to tune your JVM options to improve the tool's speed. And the improvements brought in the 11.1.2 branch show we can expect even more performance for 12c.

What I saw in my VM was beyond what I had seen before, anyway. The splash screen was being displayed for nearly a minute before the progress bar showed... And no update centers were available when I checked for updates, preventing me from downloading any. Clearly, something was amiss. With 8gb allocated to it and two virtual CPU cores, resources weren't the problem. After searching on the web for a few minutes and coming back empty-handed, I decided to start JDeveloper on the command line.

[Read More]

Friday Dec 21, 2012

The great Windows 8 experiment

Two weeks ago, I decided to make the plunge: I upgraded my personal workstation to Windows 8. Why? Sure, I wanted to check if JDeveloper and WebLogic worked correctly. But I must admit my main motivation was curiosity. You see, when I read quotes such as: « On a regular PC, Windows 8 is Mr. Hyde: a monster that terrorizes poor office workers and strangles their productivity. », it was hard to resist the temptation of forging my own opinion. 

Today, I am writing this post under Windows 8. And I have no intention to go back to Windows 7.

I have very little to report about Oracle's Java tools. They simply just work, as I expected. The JVM  abstracts the underlying OS as on any other platform. I only had two small glitches up to now.

[Read More]

Friday Dec 14, 2012

Saddling your mountain lion with JDeveloper

Last October, Apple released Java Update 2012-006. This patch brought the Apple-provided JDK for OS X Lion v10.7 and OS X Mountain Lion v10.8 to version 1.6.0_37. At the same time, it disabled the Apple Java plugins and removed the Java Preferences panel that enabled users to manage the various Java releases on their computer.

On the Windows and Linux platforms, JDeveloper 11g R1 has been certified  to run on Java 7 since patch set 5. This is not the case on OS X.  

( The above is not a typo. Apple's OS for personal computer is now known as OS X; the « Mac » prefix has been dropped with the 10.8 release. And it's pronounced « Oh-Ess-Ten », by the way. )

Please note JDeveloper 11g R2 is not certified either. On any platform. It will generally work, but there are known issues with ADF Mobile. Personally, I would recommend to wait for 12c before going to JDK 7. 

Now, suppose you have installed Oracle's JDK 7 on your Mac. JDeveloper will not run on it. It will even not install. Susan and I discovered this the hard way while setting up the ADF Mobile hands-on lab we ran at the UKOUG 2012 conference. The lab was a great success nevertheless, attracting nearly a hundred delegates. It was great to see the interest ADF Mobile already generates, especially among PL/SQL Developers and DBAs. But what did we do to make it work? 

[Read More]
About

Frédéric Desbiens

The musings of a member of the Mobility and Development Tools Product Management team.

I focus here on my favorite development frameworks, namely Oracle ADF and the Oracle Mobile Application Framework (MAF), but also have a strong interest in SOA and web services.

The views expressed on this blog are my own and do not necessarily reflect the views of Oracle.

Search

Archives
« May 2015
SunMonTueWedThuFriSat
     
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
      
Today