Disclaimer

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

Wednesday, July 4, 2012

Shorter URL parameters for ADF Application

Yes. It is shorter than before now with new ADF version 11.1.2.2.0.

Old ADF URL parameters:
https://host/myapp/app1?_afrLoop=54603428702000&Adf-Window-Id=w0&_afrWindowMode=0&_adf.ctrl-state=8y48oltmq_3&_afrRedirect=54603481521000

New ADF 11.1.2.2.0 removes all these URL parameters except the controller state, so it becomes

https://host/myapp/app1?_adf.ctrl-state=8y48oltmq_7

I think in future release, all these internal parameters will be removed from URL and makes ADF Application prettier :)

WebLogic 11g : How to setup SSL for my website?

Okay, development is done, application deployed, but wait i need to ensure data is encrypted between users browser and my weblogic server. So how to do that?

Step 1. Generate a private keystore and private key

Example ./keytool -genkey -alias myalias -keyalg RSA -keysize 2048 -keystore mykeystore.jks

Step 2. Generate a CSR which we'll send to Certificate Authority
Example ./keytool -certreq -alias myalias -file mycertrequest.csr -keystore mykeystore.jks
Note: When generating a CSR, enter the domain of your website (i.e. www.mysite.com) in the "first- and lastname" field.

Step 3. Most of the Certificate Authority today uses Intermediate Certificate, so we need to import it to our trusted keystore
Example ./keytool -import -alias rootca -keystore mytrustkeystore.jks -trustcacerts -file intermediateCA.cer

Step 4. After receiving the certificate from Certificate Authority, import it into private key store (the initial keystore used to send the CSR)
Example ./keytool -import -alias myalias -keystore mykeystore.jks -trustcacerts -file sslcertfromca.cer

You can view the contents of keystore using below command:
./keytool -list -v -keystore mykeystore.jks -storepass mypassword

Step 5. Configure weblogic server keystore and SSL
Your Server > Configuration > Keystores
Change the Keystores to Custom Identity and Custom Trust, and then put the Keystore details as you have created before. Keystore type is JKS.

Your Server > Configuration > SSL
Put the alias that you have created before and password.

Save.

After completing above steps, restart weblogic server and don't forget to enable SSL port. Now you should be able to access your application with https.

Saturday, June 25, 2011

Introduction to Oracle J2EE Application Development Framework: Oracle ADF

If you are Java Developer and looking for a great, future proof J2EE Framework, you are at right place.
Oracle J2EE Framework has been evolved for more than 10 years. It has been improving in every release and still intensively developed by Oracle. In fact, it is the core development framework for Oracle Fusion Applications (Oracle E-Business, SOA Suite, WebCenter etc).

It started using the name Java Business Object (JBO, that's how oracle.jbo package came from), then change into Business Component for Java (BC4J), then Oracle Application Development Framework (ADF). Despite of these different naming, basic design principal is still the same with enhancement, features, bug fixes, etc.

I learned this framework since version 9i and all the experiences I had since then are still valid and it's never been a wasted effort, and i am really glad about it.

There are three main components of Oracle ADF:
1. Model
2. View
3. Controller

Simple explanation for above components:
Model is where your business data is stored (Persist).
View is where users view the Business Information based on the Model.
Controller is the connectors or links for your Views.

OK, let's start with a very basic Oracle ADF sample project. Typically, ADF Application has two projects: Model and ViewController.


Model Project contains all your business data objects. You can use different technology for this. Currently it supports ADF Business Component (XML of your database tables), Plain XML, Toplink, Text File, etc.

ViewController Project contains all your Web Application pages and ADF Controller XML files.


In above screenshot, i'm using ADF BC (That's it AppModule, Emp, EmpView are my Business Components which are built using ADF BC) in Model Project and Facelets (Emp.jsf) with ADF Controller (adfc-config.xml) in ViewController project. I hope with this very brief explanation of Oracle ADF could help you to understand what is Oracle ADF and its components.

Want to see the demo? check out this link Oracle ADF demo

Cheers!

Wednesday, May 18, 2011

So when to use Active Data Guard or Golden Gate?

On my previous post, I posted some differences between Active Data Guard and Golden Gate. But some people may find it more confusing and ask when should I use Active Data Guard? or Golden Gate?

So let me try to summarize it here:

Use Active Data Guard for:
Disaster Recovery, Data Protection/HA (Oracle environment)

Use Golden Gate for:
Information Distribution, Data Integration, Cross-platform migrations (For ex. SQL Server to Oracle)


They can also complements each other.
ADG provides read-only replica for standby database, and GG capturing standby archive logs then replicating it to 'n' different target systems.

Saturday, May 14, 2011

What's the difference between Active Data Guard and GoldenGate?

Active Data Guard vs Golden Gate?

Active Data Guard (ADG) is a replication technology from Oracle to create exact mirror of one database.
GoldenGate (GG) is a heterogeneous database replication from different database vendors to one or more target repository (Database, File, JMS Queue, etc.).

Summary of the differences between ADG and GG:

Active Data Guard:
- Ship from memory
- Sync or Async
- Simple one way replication
- Standby open read-only
- Zero I/O overhead, near-zero primary performance impact
- Standby database is exact physical replica
- No data type or other restrictions
- Integrated with Oracle Kernel

GoldenGate:
- Read and ship from redo logs (configurable to read directly from table, if necessary)
- Async only
- Advanced, multi-master replication (if conflicts can be avoided or resolved)
- Target database open read-write
- I/O Overhead and capture processing on primary
- Replica is logical copy maintained using SQL
- Data type and other restrictions
- External to Oracle Database

From licensing perspective, GoldenGate bundles Active Data Guard together.

Tuesday, April 26, 2011

Out-of-the-box Result Caching with Oracle Service Bus

On my previous post (http://rickyhp.blogspot.com/2011/04/creating-robust-scale-out-data.html), i have shared about Data Abstraction and Cache with Oracle Coherence. Today let's see how Oracle Service Bus can provide out-of-the-box data cache solution for your existing web services without changing any of your application's code.

Oracle Service Bus provides out-of-box caching mechanism using Oracle Coherence. You can use it to cache result from any Business Services.
This can dramatically improve performance if the response from the business service is relatively static.
Oracle Service Bus uses a single cache for all business services. Only valid/correct results from business services are cached.

For cache expiration, cached results have a time-to-live (TTL) attribute.
You can configure cache expiration either with the Expiration Time property in the Result Caching configuration on the business service or the cache-ttl element in the $transportMetaData using the proxy service message flow.

If Oracle Coherence finds that the TTL has expired, it flushes the cache, and the business service invokes the external service for a result. That result is then stored in the cache (if there is no error in the result), and the result is available in the cache so that it can be returned to the next request.

The following events illustrate how Oracle Service Bus/Coherence flush cache:

•Cache TTL has expired – Each cached result has its own TTL. When a TTL is reached, Oracle Coherence flushes that individual cached result.

•Disable result caching on a single business service – When you disable result caching on a business service, Oracle Service Bus triggers flushing of all cached results for that business service in Oracle Coherence.

•Update, Rename, or Delete a business service – If you update, rename, or delete a business services, Oracle Service Bus triggers flushing of all cached results for that business service from Oracle Coherence.

•Update dependent resource – When you update a dependent resource, such as a WSDL, Oracle Service Bus triggers flushing all cached results for that business service from Oracle Coherence. However, changes to the following dependent resources do not cause cache flushing: Service Provider, UDDI Registry, Alert Destination.

•Globally disable result caching – When you globally disable result caching, Oracle Service Bus triggers flushing the entire result cache (all cached results for all business services) from Oracle Coherence.

For details, please refer to below link:
http://download.oracle.com/docs/cd/E14571_01/doc.1111/e15867/configuringandusingservices.htm#OSBAG170

Oracle Fusion Middleware and Java Support Policy

Many people confuse with Oracle Support Policy regarding Oracle Fusion Middleware and Java, especially after Oracle acquires Sun Microsystem.

Any Oracle Fusion Middleware products (including Oracle WebLogic Server and Oracle Application Server) are supported as a single unit. When Java SE is used to run an Oracle product, it is treated as an integrated component in the product and follows the End of Life of the middleware product.

Examples:
  • End of Life (EOL) was announced for J2SE 1.4.2 in June 2007 and for J2SE 5.0 in October 2009. Several versions of Fusion Middleware products run on these versions of J2SE. The J2SE End of Life only applies to J2SE when used standalone or with 3rd party applications. For Fusion Middleware, the Oracle Lifetime Support Policy Extended Support time lines take precedence.

  • When Oracle announces End of Life for Java SE 6 or a later version of Java SE, that announcement only applies for Java SE used standalone or with a 3rd party product. For Fusion Middleware, the Oracle Lifetime Support Policy Extended Support time lines take precedence.
Hope this helps people who has concerns on Oracle Product Support Policy

Cheers!