Wednesday, December 9, 2009

Oracle UCM with WebLogic Embedded LDAP

This post is a continuation of Installing WebCenter Suite 11g on Linux for Development and Oracle Discussions Configuration.

Just follow these 3 steps:

1. Access Oracle Content server main page, if you followed my instructions it would be http://servername:7777/cs, and login as sysadmin. Default password is idc. Once you are logged in, go to the section Administration and click on Providers.

Click on Providers


2. Add a new ldapuser.

Add a ldapuser


3. Insert the values below accordingly. That's it.



I'll soon talk about WebCenter Wikis and Blogs configuration.


Saturday, September 26, 2009

Meet you at Oracle Open World 2009

This year I'll have the honor of presenting Introducing Oracle WebCenter Suite 11g (S311628) with Vince Casarez, VP of Product Management, and Vineet Duggal, Senior Development Manager. Don't miss our presentation.

You can also find me at the WebCenter Demopod and Handson lab. I believe Demopods are the best opportunity you have to meet WebCenter Product Managers, discuss about the product and get some advices on how to implement your solution.

If you are looking for more info on ADF, stop by at Oracle OpenWorld Unconference. There'll be lots of ADF gurus sharing their experience and demoing some pretty interesting use cases. Maiko Rocha and myself will show a Facebook and Yahoo Mail sites built on ADF.

I'm looking forward to see you there.

Wednesday, September 23, 2009

MDS in a Nutshell

MDS or Oracle Metadata Services is one of the most unknown and misunderstood features on Oracle FMW. For most folks it is a black box. But now I want to clarify what it is about and how you can take advantage of it.
Being really simplistic, MDS is a repository that contains all metadata related to your customizable application. Those customizations could be:
  1. Seeded customization. This one happens at deployment time. All customizations are carried inside a MAR file on your artifact.
  2. User personalization.
  3. Design time at Runtime, aka, Composer, aka, Business Dictionary.
  4. SOA composite application.
At runtime, all your customizations are retrieved by MDS and applied to the base application, revealing the final customized app.
A customizable application can have multiple customization layers. For instance: retail_stores and electronic_stores. Each layer can also have multiple layer values. For instance, electronic_stores can have the following values: BestBuy and Frys. Usually, we only apply one of those values at a time in runtime. Inside a Customization class we could check whether the user is a BestBuy or Fry's employee and apply the appropriate look and feel to the website. I promise I'll get into more details in a future post.

MDS Structure

MDS can be a file-based or database-based repository. On development environment, to avoid waste of resources, you should use the file-based version. And on production environment, Oracle strongly recommends to use a database-based version to take advantage of the many added features such as versioning and atomic transaction.
By default, WebCenter comes with 2 MDS repositories already setup, one for OWSM and the other for Spaces. If you are deploying a new application, in my personal opinion, it's a good practice to create a new MDS repository and register it on Enterprise Manager. Let's talk about 2 important concepts before moving to deployment: partition and label.


Partition

Partition is an independent logical repository inside an MDS repository. A single MDS repository can have multiple partitions and each partition can be associated with more than one application. I do not recommend this approach, because it can make your life harder while managing application's metadata. Try to keep "1 app equals 1 partition". You can create, delete, clone, import and even export a partition to move the metadata from one environment to the other (test to production).

Label

A label represents a metadata state. Inside a partition you can have many labels. If you create a new label you basically take a snapshot of your current metadata state. You can also delete labels and promote them, making an old label the current version.

Deployment

As a predeployment task you choose which MDS repository schema and partition will host your application metadata. Once you have your application successfully deployed, a label gets automatically created. It should look like this: postDeployLabel_MyWebCenterApp_1170408561. If you change any customization values, such as a web service endpoint, those changes do not adhere to the current label. So, a new label needs to be created to hold the current state of the application metadata.
If something unexpected occurs there is alway a chance of getting back to the previous version. Remember, that MDS has a version control mechanism. The only thing you have to do is to promote back the previous label.
For more detailed information please read Managing the Oracle Metadata Repository.

Sunday, September 13, 2009

JDeveloper 11g on Mac OS 10.5 and above - Extended

If command line is not your thing and starting JDeveloper through a shell script is not an option for you, I'm going to show you a quick trick.

You might remember, in my last post I had a shell script (jdev.sh) with 2 exports command. So, you might have tried to add the variables to ~/.profile, ~/.bashrc , /etc/profile or even /etc/bashrc with no success. That's because Mac OS X programs do not use environment variables. It behaves in a different manner.

Let's create a file to keep those env vars on user session scope. Do this:

1. Create the .MacOSX folder.

mkdir ~/.MacOSX

cd .MacOSX

2. Create the environment.plist file

vi environment.plist

3. Paste the following content:

{

     "JDEV_HOME" = "/Developer/Applications/Oracle/Middleware/jdeveloper";

     "JDEV_USER_DIR" = "/Developer/Applications/Oracle/jdev_home_11g";

}

You also have the option of opening environment.plist with /Developer/Applications/Utilities/Property List Editor.

4. Time to logout and login back again.

5. Open Finder and go to /Developer/Applications/Oracle/Middleware/jdeveloper. You should see JDeveloper icon. Drag and drop it into your Dock. You are done.



I hope this helps, folks.

Friday, September 11, 2009

JDeveloper 11g on Mac OS 10.5 and above

It's been a long time since my last post. I'm recovering from 2 failed Snow Leopard installations and a soar throat. Maybe having to reinstall my 2 Macs was more painful than 1 week of "swallowing pieces of glass".

Since I had to reinstall JDev twice I decided to post about the few tricks we've got to do to have JDeveloper 11g working flawlessly on your Mac.

First of all, check if JDK 1.6 64bit is your default JVM. You can do that by opening the Terminal and writing:

java -version

You should see something like:

java version "1.6.0_15"
Java(TM) SE Runtime Environment (build 1.6.0_15-b03-219)
Java HotSpot(TM) 64-Bit Server VM (build 14.1-b02-90, mixed mode)

If that's not the case you can fix it under Applications -> Utilities -> Java Preferences. On the Applications section, move Java SE 1.6 to the top.

As a second step, let's create a sym link to rt.jar:

mkdir -p /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/jre/lib
cd /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/jre/lib
sudo ln -s /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/classes/classes.jar rt.jar

Now you can run:

java -jar jdevstudio11111install.jar

I usually install JDeveloper under /Developer/Applications/Oracle/Middleware, but feel free to choose a different directory.

Before starting JDeveloper, you've got to make a final change due to an issue that I found on Oracle Forums. Open jdev-Darwin.conf:

$ vi /Developer/Applications/Oracle/Middleware/jdeveloper/jdev/bin/jdev-Darwin.conf
And add the line below to the end of the file:
AddVMOption -Djava.io.tmpdir=/var/tmp

We are ready to start JDeveloper 11g. You can find the executable on Finder at /Developer/Applications/Oracle/Middleware/jdeveloper.

If you don't previously set JDEV_USER_DIR env var, the embedded WebLogic Server will be created under /Users/<username>/.jdeveloper/system11.1.1.1.33.54.07/DefaultDomain and your default working folder will be under /Users/<username>/jdeveloper/mywork. Please notice that the DefaultDomain is created under a hidden directory, which makes your life a little bit harder to access WebLogic config files and other stuff that you might need to touch in the future.

To avoid this kind of confusion I usually start JDeveloper through a shell script under JDeveloper installation directory.

$ cat /Developer/Applications/Oracle/Middleware/jdev.sh
export JDEV_USER_DIR=/Developer/Applications/Oracle/jdev_home_11g
export JDEV_HOME=/Developer/Applications/Oracle/Middleware/jdeveloper
xterm -e $JDEV_HOME/jdev/bin/jdev -nonag -noreopen

You will find all your extra folders in a single place: /Developer/Applications/Oracle/jdev_home/11g. Besides, the parameters nonag and noreopen will make JDev open faster.

nonag - disables all dialogs and other items that appear during JDeveloper startup.

noreopen - starts JDeveloper without reopening the editors from the previous session.

Sunday, August 23, 2009

Oracle WebCenter on Twitter

You can also find the latest news and posts about Oracle WebCenter on Twitter. See you there!

Friday, August 21, 2009

Task Flow or Portlet: what to choose?

Task Flow

Task Flow is a new concept introduced on ADF 11g where you can encapsulate control flow rules, activities and managed beans to implement business modules. You can also package one or more task flows into ADF Libraries. Easing the reusability of your business modules among different applications. Therefore, a Task Flow can be seen as a “local portlet” that can be reused and dropped into any ADF app.

Advantage

- Skin is propagated to task flows components.

- Runs on the server side. There are no remote task flows.

- Easy to reuse and customize.

Disadvantage

- Application restart is needed when publishing an ADF Library on Business Dictionary.

- If used in more than one app, the same jar file has to be seen by different class loaders. Not easy to maintain.

Portlet

Portlets by definition are pluggable user interface based services that are managed and displayed by a portlet container.

The Java Portlet specifications are JSR-168 and JSR-286. The last spec was introduced due to the need of building integrated composite applications. The main feature is the inter-portlet communication that can be done in 2 ways:

  • Eventing: allows portlets to send  and receive events from other local or remote portlets.  
  • Public parameters: allow portlets to share parameters with other portlets.

Advantage

- Easy to share between different apps.

- You don’t need to restart WebCenter to publish new Portlet Producers into your Business Dictionary.

Disadvantage

- Communication logic among portlets are usually replicated on each page.

- There are no transactional semantics across portlets

- Static look and feel.

- Not as performant as ADF Libs.

JSF also brings a common problem for both technologies. JSF Component structure renders sequentially. Which means that when a JSF page construction hits a portlet it waits for the portlet to render, before proceeding to the next component. If it’s a remote WSRP portlet, it will wait for the SOAP calls to bring and render all HTML pieces before continuing the rendering process. However, if it’s a task flow, embedded into an ADF library, there is no network overhead, since it’s right there in your classpath.

A nice tip is that Oracle JSF Portlet Bridge is an iframe based portlet, which allows browser to do parallel processing. Browsers such as Firefox renders 2 iframes in parallel at a time.