Search This Blog

Loading...

Friday, September 28, 2012

Apple: iPhone 5 comparing to iPhone 4s after trial in App Store SF, CA.

I have seen the "iPhone 5" and try it hardly in Apple San Francisco retail store, but i didn't admire with it i did't feel the Wow, In my comparing with iPhone 4s there is no difference between them except few things:
  1. Bigger screen 4" instead of 3.5" which is not the big deal.

  2. Processor A6 instead A5.

  3. Lighter than 4s by 40 Gm.

  4. All software features are in iOS 6 are the same for both phones.

  5. New EarPods witch could be bought separately and works with 4s.

lastly front camera is 1.4 m instead of VGA in 4s.

for me those changes is not the big deal that makes me changing my mind to buy iPhone 5.

Saturday, September 22, 2012

JDeveloper: Ability to perform ODL log analysis

A possibly lesser known feature of JDeveloper is its ability to perform ODL(Oracle Diagnostic Log) log analysis, known as the Oracle Diagnostic Log Analyzer.

This feature allows you to open a diagnostics log file (or use the log file currently in the Log window in JDeveloper) and do a limited yet useful log analysis. For the Standalone WebLogic Server, diagnostics log files are produced by applications running on the specific WebLogic Server instance.

The log files are produced and saved by WebLogic in a directory configured by the WebLogic administrator. This directory defaults to the logs directory under the servers directory for the specific server instance; that is, for a server instance called ManagedServer1 they can be found in servers/ManagedServer1/logs.

The servers directory is located under the specific domain directory. In this blog, we will see how to analyze a diagnostics log produced when running an ADF Fusion web application on a Standalone WebLogic Server. Alternatively, you can run the application in JDeveloper and analyze the log produced in the Log window.

Getting ready
-----------------
You will need a Standalone WebLogic Server domain configured and started. You will also need your Fusion web application deployed to the Standalone WebLogic Server.

How to do it…
-----------------
  1. Run the application deployed on the Standalone WebLogic Server, so that a diagnostics log file is generated. Alternatively, if you already have a diagnostics log file to analyze, you can ignore this step.

  2. In JDeveloper, select Tools | Oracle Diagnostic Log Analyzer from the main menu.


  3. Click on the Browse Log Files button (the search icon) to locate the diagnostics file and open it.

  4. Click on the By Log Message tab and specify the search criteria in the Search section. Press the Search button to commence with the search.


  5. In the Results table, click on a value inside the Related column for a log entry of interest and select Related By Request from the context menu.


How it works…
---------------------
Steps 1 through 5 give the details of the process of analyzing a diagnostics log file using the Oracle Diagnostics Log Analyzer feature in JDeveloper.

The Oracle Diagnostics Analyzer is accessible via the Tools | Oracle Diagnostic Log Analyzer menu selection. Once started, you will need to load the specific diagnostics log file to analyze. We have done this in step 3.

You can search the diagnostics log entries using either the By ADF Request or the By Log Message tab and specifying the search criteria. The By ADF Request tab will display only the log entries related to ADF requests made when a page is submitted.

On the other hand the By Log Message tab will search all log entries in the log file by their log level. Moreover, the search criteria in both tabs allow you to search for diagnostic log entries based on their Log Time and based on the message content (Message Id, User, Application, Module, and so on).

The results of the search are displayed in the Results table. The results data are sortable by clicking on the column headers. To display all related log entries, click inside the Related column for a log entry of interest and select any of the choices available in the context menu.

These choices are:
  1. Time:
    Filter diagnostic log entries to view all log entries leading up to the specific entry. You can refine the time before the entry using the dropdown.

  2. Request:
    Filter diagnostic log entries to view all log entries for the same web request.

  3. ADF Request:
    Switches to the By ADF Request tab to display the diagnostic log entries in a hierarchical arrangement to show their execution dependencies.

Tuesday, September 18, 2012

JDK7: When Using the SecureDirectoryStream class

The java.nio.file package's SecureDirectoryStream class is designed to be used with applications that depend on tighter security than that provided by other IO classes.

It supports race-free (sequentially consistent) operations on a directory, where the operations are performed concurrently with other applications.

This class requires support from the operating system. An instance of the class is obtained by casting the return value of the Files class' newDirectoryStream method to a SecureDirectoryStream object. If the cast fails, then the underlying operating system does not support this type of stream.

Getting ready
-----------------
To get and use a SecureDirectoryStream object:
  1. Create a Path object representing the directory of interest.

  2. Use the Files class' newDirectoryStream method, and cast the result to a SecureDirectoryStream.

  3. Use this object to affect SecureDirectoryStream operations.

How to do it
-----------------
  1. Create a new console application.
    In the main method, add the following code. We will create a Path object for the docs directory and then obtain a SecureDirectoryStream object for it.
    This will be used to view the POSIX permissions for the directory.

  2. Execute the application on a system that supports the SecureDirectoryStream class.
    The following output was obtained by running the application on an Ubuntu/Mac system:

    GROUP_EXECUTE OWNER_WRITE OWNER_READ OTHERS_EXECUTE GROUP_READ OWNER_EXECUTE OTHERS_READ
How it works
-----------------
A Path object for the docs directory was obtained and then used as the argument of the Files class' newDirectoryStream method.
The result of the method was cast to a SecureDirectoryStream class. The getFileAttributeView method was then executed to obtain a view, which was used to display the POSIX file permissions for the directory.

References
---------------
1- JDK7: Part 1- The power of java 7 NIO.2 (JSR 203) (important concepts)