Feed aggregator

Inception of ADF NOOB

Casper Bang - Thu, 2006-02-02 09:32
Welcome to my blog which will revolve primarily around real-word development issues using Oracle's JDeveloper IDE and their Application Development Framework (ADF). It is my attempt to communicate what I have learned to peers and in the process hopefully gain a better understanding myself.

ADF is vastly different than traditional web application development as well as other 4/5GL frameworks. It introduces an enterprise development infrastructure unlike most other, with a shift towards a highly declerative paradigm which encapsulates all parts of a J2EE application. ADF and the associated IDE, JDeveloper, relies on a complex stack of associated tier technologies and as such, is not the easiest to get started on without feeling that you are drowning in complexity. This blog will deal primarily with Apache Struts as the controller tier and Oracle UIX as the view tier, running on top of Oracle 10g.

While ADF and its associated tier technologies are definately not as easy to get started on as classic server side scripting with embedded PL/SQL nor other frameworks (Rails, Spring etc.), it constitutes the higher learning curve in the long run by addressing application issues on a large scale such as maintenance, service orientation and rapid application development (RAD). In a testiment to this, in a recent development contest Oracle ADF took home the gold and silver medal for being the most productive RAD framework. While neither JDeveloper nor ADF is open source, it is completely free to use and applications can be deployed to any J2EE-compliant application server. On a personal note, ADF is about the only framework I've come across, which allows a composite/joined table view to get its related (detail) table updated as well as the primary (master) table by means of the framework!

Why not?
As already mentioned, in order to benefit from the ADF framework you really must be willing to put in a substantial amount of time before you can expect to develop any real-world applications. On a more subtle note, realize that while ADF is at a fairly mature state as of JDeveloper 10.1.2; tools, documentation and community support might be sub bar compared to what you are used to in other development environments and frameworks. And finally you should also be aware, that standards and next-generation technologies will append or replace ADF and currently associated tier technologies. For example, the next version of JDeveloper (10.1.3) introduces a new view and controller framework known as Java Server Faces (JSF). Developer Joel Spolsky has an entertaining analogy to the complexity of frameworks.

ADF encapsulates many J2EE patterns within its framework, including the infamous MVC pattern. From top to buttom, a typical ADF application can be though of as having 4 tiers.

The view tier which is where all the UI rendering happens, a controller tier which handles navigational aspects and a model tier where data is bound to the final tier; the Business Service tier.
These Business Services are at the very core of ADF and this is where you will find the applications point of entry, known as the Application Module (AM). To uptain a detailed understanding of how the underlying binding layer works, Oracle publishes an up-to-date ADF Data Binding Primer.
Categories: Development

The Model: AM, Entities, Views etc.

Casper Bang - Thu, 2006-02-02 09:27
As already mentioned in my first blog entry, ADF is composed by a multitude of layers within a large technology stack and these can be abstracted into the MVC pattern. In reality, the View and Controller layer in ADF is collapsed into the same layer and this is why most ADF applications actually consist of 2 independent projects within one ADF application, namely the Model and the ViewController. The following provides a quick and rudimentary explanation to what you will find in the Model part of such an application.

Application Module (AM)
This is your applications point-of-entry and essentially responsible for launching and managing the data-model beneith your applcation. Whichever Views and ViewLinks you may have created will not have any effect (be visible) before they are added to the AM. The default implementation of the AM is in ApplicationModuleImpl.java which will have a main method for launching a default Swing test application which can come in very handy when debugging and testing your model layer. You may extend the default implementation, as is often nessesary, in order to satisfy various pre-condtions such as user authorization etc. For example, to lock a specific view (E.g. UserView) to only show records with the users own initials (CLB in my case), the following could be done:

protected void prepareSession(Session session)
this.getUserView().setWhereClause("UserView.initials = :initials");
this.getUserView().setWhereClauseParam(0, "CLB");

Whichever view is linked to the UserView, will "inherit" this limitation and thus provides an excellent way of ensuring users see only their related rows. This could not have been achieved by a pure static view since the view is dynamic by nature, adapting to whichever is signed in to the system.

Entity Objects
Entity objects are at the very heart of an ADF application and its responsibility is to encapsulate a database table (and its rows). The framework will require there be a primary key column before doing so, the reason for this will be obvious in a moment. A java representation instance is required in order to model layers on top and add business logic. ADF can overide the default Java representation for an Entity and expose type-safe accessor methods for
association attributes rather than the default getAttribute("
"). In JDeveloper an entity has both an instance (.java file) and related metadata (.xml file).

Handles relation and cardinality between two entity objects. These attributes allow you to navigate from one entity instance to either another entity instance or a collection of related instances, depending on the cardinality of the association in question. This can be done by using
") where the framework will use the association to perform a findByPrimaryKey() on the related table and fetch the data for you. Associations are paramount to making views over multiple Entities, by using the association information to automatically construct the underlying join (WHERE clause). Associations are just metadata for the entities, stored in corresponding XML files.

View Objects
In the simplest sence, a view is nothing more than a SQL query. However, even if a view is composited over multiple Entity objects, it can be updated just as if it was an atomic table in the database. This is done providing the "reference" attributte for the Entity object is checked and is what distinquishes an ADF view from a database view.

Handles relation and cardinality between two view objects. ViewLink's connect two views in a Master-Detail fashion, where the master view provides an overview og more detailed data, usually as a 1:* relation between views. When a ViewLink is created between two views, the newly linked attributtes become available to each view.

Categories: Development

Should JSF go stateless?

Adam Winer - Tue, 2006-01-31 16:12
Jacob Hookom's written an interesting blog entry about whether JSF could go stateless. The two of us have gone back and forth on this on e-mail a bunch of times, and I guess you could say that I fall in the "UI state is a good thing" camp. In large part, that comes from all the time I've spent working on component frameworks.

I absolutely agree with Jacob on one of his points - "Statesaving in JSF is [really] bad in implementation". It's a massive and heavyweight "save everything on the page" approach that is, at least conceptually, horrible overkill. For example, it's ridiculous that we have to save the UI component hierarchy, attributes, EL expressions, etc., when we have a JSP or Facelets document containing exactly that information just sitting there on the server. Even though I know why this happened - JSF had to support JSPs, etc., etc. - it's a very frustrating state of affairs.

Nevertheless, I think throwing out state saving altogether in response would be going too far. It'd be like saying that you should never bother sorting because Bubble Sort is a really slow algorithm. Unfortunately, JSF, as designed today, makes it very difficult to even attempt to optimize state saving. Until there's a really sane, solid implementation of state saving, any big policy decisions are premature.

The real problem with optimizing JSF state saving is the way that UIComponent.saveState() (and restoreState()) is typically implemented. Each class is responsible for saving all of its own per-instance state, up and down the hierarchy. So UIComponentBase stores its properties in an array, then UIOutput stores a few more properties (plus the UIComponentBase state) in an array of its own, then UIInput aggregates its own state, and finally HtmlInputText adds its own. For example, here's the start of HtmlInputText.saveState():

public Object saveState(FacesContext _context) {
Object _values[] = new Object[31];
_values[0] = super.saveState(_context);
_values[1] = accesskey;
_values[2] = alt;
_values[3] = dir;
_values[4] = this.disabled ? Boolean.TRUE : Boolean.FALSE;
_values[5] = this.disabled_set ? Boolean.TRUE : Boolean.FALSE;
.... and on and on and on for another 26 lines ....

Nasty! If a container wanted to optimize state saving, it'd somehow have to mix that in not just into one class, but into every component class up and down the hierarchy.

ADF Faces took a different approach. We store all of our component state in an FacesBean instance. It takes care of storing simple properties, ValueBindings, lists (like listeners and validators), and knows how to save and restore state. Here's the full code for UIXComponentBase.saveState();

public Object saveState(FacesContext context)
return getFacesBean().saveState(context);

And subclasses don't neeed any code at all. Aaahhhh..... Now that's better. More on FacesBean in a later post (there's a lot of other advantages), but what's relevant is the general principle: all state saving is implemented up in the base class, so now there's a hook to implement real cross-cutting optimizations like:

  • Cache reusable FacesBean instances on a Facelet tag handler (with copy-on-write), especially for panels and output components that rarely if ever mutate

  • Implement saveState() that only saves deltas from the original state of the bean (and rely on Facelets to recreate the tree in its original state)

Secondarily, we'd do very well to follow Jacob's advice and re-think how processSaveState() and processRestoreState() function - instead of creating a deep heirarchy, create a flattened Map or array structure.

Implement all of this, and then we're in a place to judge whether fully stateless UIs are necessary. I think they will be, for some limited types of applications, but JSF can be pushed a lot further than it's going now.

Solaris & Tamil - Part II

Siva Doe - Mon, 2006-01-30 19:29

More updates. I have, with the help of OpenSolaris/Sun folks, have successfully created a Tamil locale for Solaris (10). Now, I can set the locale (in my .dtprofile) to ta_IN.UTF-8 and can see the GNOME (JDS) desktop in Tamil :-) (well most of it).
Though I see a similar rendering issue in GNOME terminal. (swapping of characters), while all other apps (panel on menu items, metacity on window titles) seem to render them okay.
Next step is to get the X11/Openwin part of the localisation, I guess.


Contains: Gedit with a Tamil text, Firefox (built with --enable-pango), Run dialog, GNOME-terminal (compare the date output with the one on the panel on top).


New Oracle Q&A site

Mihajlo Tekic - Sat, 2006-01-21 12:00
I saw many posts about new Eddie Awad’s site Oracle Questions and Answers. Some of them criticize it some of them recognized it as a new Oracle Q&A site.
It was interesting to read what Tom Kyte and Howard Rogers wrote about it. One simple solution presented on Oracle Q&A produced big and strong discussion about possibility of one table to be read-only.
Howard Rogers did research about this possibility and as a result he got that one Oracle table could not be read-only in real meaning of the phrase “read-only”. So, his standing point was that this site does not provide real and true information.

From my perspective, this is good and useful site. You can find very useful information there. I agree that some of the answers are short, but sometimes it is better to get the idea, so you can extend it and adapt it to your needs.

Recently, I found very good solution how to generate sequence numbers between two numbers. For this purpose I was always using one table filled with sequential numbers from x to y. I was creating new rows whenever I needed it. But, the solution presented at Oracle Q & A, is so simple and practical.

select (lvl + &v_from - 1) myseq
from (
select *
from (
select level lvl
from dual
connect by level <= (&v_to - &v_from) + 1
order by myseq

This is very good place where you can find useful tips.

Mihajlo Tekic

Moving the Politics to freestateblogs.net; Keeping the Oracle stuff here

Denis Goddard - Fri, 2006-01-20 21:47
For the past 6 months, I have been maintaining this single blog.
The problem is, there are two rather disparate domains about which that I typically rant:

  1. My work at Oracle Corporation, the software product I work on there, and other geeky Software-related stuff

  2. The Free State Project, New Hampshire politics, and my generally Libertarian opinions

Now, it seems to me, that most of the people interested in my Oracle work really don't give a hoot about my politics. Indeed, one of the beautiful things about the capitalist Free Market system is that it allows people to work together, even when they do not share the same beliefs or opinions.

Moreover, it just seems impolite to broadcast my personal political ideas at people, if all they want to know is what I'm thinking with the latest release of ADE.

That said, I do want to ensure that folks far and wide know all about the Free State Project. I especially want people to know about the excellent progress being made in New Hampshire.

To that end, I have created a new website:

That site is intended to become a portal for information about pro-Liberty goings-on in New Hampshire.
From this point forward, the blog you are now reading will be dedicated to things relating only to ADE, Perl, Oracle, Software Configuration Manamgement, and maybe stuff like how much I miss the gym at Oracle HQ, or how much I love being three timezones ahead of Oracle HQ.

Please, feel free to comment... and to check out freestateblogs.net, if you're interested in that sort of thing.

Oracle Streams problems ... Check the Alert Log first!

Mihajlo Tekic - Fri, 2006-01-20 17:49
Some days I just don’t have luck.
Whatever I tried to do, I couldn’t achieve it. But, fortunately it is only one day and not whole day :-).
I was investigating Oracle Streams whole month. I got good results and everything seemed to be going so well until, I decide to add new destination site in my Oracle Streams environment.
I was wondering why all those people on forums have issues with Oracle Streams, it is much better than Advanced Replication, and with Oracle 10g R2 you can use OEM to monitor your Streams environment.
One thing what bothered me, while I was learning and investigating streams, was lack of resources and practice examples how to setup streams environment. There is only one book about Oracle Streams available “Oracle Streams - High Speed Replication and Data Sharing” by Madhu Tumma., and off course I bought it. I found some good information there, but most of the scripts what I found inside were not so helpful, because the information what I got from them can be found very easy using some dictionary views.
Also, there is no chapter about how the existing Oracle Streams environment can be extended with new destination database.
No, don’t get me wrong, I don’t like to criticize this book, it is quite good for a beginner to understand Oracle Streams.
So, I continued to find the way to add another database to my destination databases set.
I created new propagation process in the source database.
I crated streams administrator in the destination database, instantiated all tables, created apply handlers and apply process.
But, when I started the apply process, the changes from the source database were not being applied to the target tables.
The first thing what I got in mind was to check whether some errors occurred in some of the processes (capture, propagation, apply). But, I didn’t find any errors there. I thought, here comes the difficult part.
I checked the propagation jobs aq$_schedules. I notice that all propagation jobs have LAST_RUN value, except the propagation job for the new database. Oh, there you go, I said, there my problem is.
I checked everything related to the propagation process, I was dropping and re-creating it several times. Nothing happened…still nothing.
I was searching on the net, trying to find something related to the problem I have, but unfortunately except many old posts (most of them related to Oracle Streams for Oracle 9i) I didn’t find anything useful.
I open the OEM, and tried to monitor the Streams process from there. I notice that the propagation process is propagating messages. Then I decide to check and monitor Apply process. I saw messages are arriving, but nothing being applied.
This is good, this is progress, I thought and continued to check all components of the apply process (queue, queue tables, handlers, etc).
I spent almost whole day checking, researching, investigating, and trying to figure out what is the reason for my issue. During that time, I notice many OEM “bugs” related to Streams monitoring features: if one propagation process is disabled, there is no way to enable it again if it is not first listed in the web page :-); you can not create propagation rule if some of the global names are longer than 30 characters :-):-) .

Finally, I decide to check the alert log of the destination database, and I found this:

knllgobjinfo: MISSING Streams multi-version data dictionary!!!

I found that I that the tables at the source database are not instantiated.
I did it using DBMS_CAPTURE_ADM.PREPARE_TABLE_INSTANTIATION, after that re-instantiated the tables in the destination database, and that was it … It worked.

Check your alert log first, anytime when you have a problem with your Oracle Streams environment, and that problem is not a recognized error stored in DBA_CAPTURE, DBA_PROPAGATION or DBA_APPLY_ERROR views.

However, these are the steps what should be taken if you want to add new destination site in your Oracle Streams environment:

1. Stop Capture Process
2. Create Propagation Process, add propagation rules for all tables which are going to be replicated.
3. Create Streams Queue for receiving changes from source queue
4. Create AQ Agent and enable its privileges on STREAM ADMINISTRATOR
5. Add the AQ Agent as subscriber to Streams Queue
6. Create a dml handler procedure for DML statements issued on the tables
7. Set the DML Handlers for each table in the environment
8. Create apply process for the destination database
9. Set instantiation SCN for tables at the source database
10. Set instantiation SCN for tables at the destination database
11. Run apply process
12. Run capture process

For the end, I must say that from my perspective Oracle Streams are much better and easier to work with than Materialized Views (Advanced Replication).

But, nothing is perfect …

Mihajlo Tekic

Orbeon delivers an amazing mix of AJAX and XForms

Omar Tazi - Fri, 2006-01-20 16:10
Just wanted to congratulate the Orbeon crew for putting out the 3rd major release of the LGPL-licensed Orbeon PresentationServer. OPS 3.0 features an AJAX-based XForms engine. The new engine brings responsive XForms user interfaces to mainstream web browsers without the need for plug-ins.

It’s all open source and available from ObjectWeb at:

Examples and documentation for OPS are available online:

Talking about ObjectWeb, Erik Bruchez (Orbeon’s Chief Architect) will give a talk about XForms at ObjectWebCon '06 in Paris on January 31. The talk will mainly consist of a live XForms tutorial built on top of OPS 3.0, with the goal of showing the audience that using the right platform, XForms is really cool and productive and can be used on mainstream browsers without plug-ins (if you use platforms like OPS 3.0).

I will also present at the same conference, come say hi if you’re around (see you there Erik):

Bitmap Index

Wijaya Kusumo - Thu, 2006-01-19 21:42
I often heard people say create a bitmap index when you need an index and when the cardinality of the data is low. How low is considered low is another thing altogether. But one important aspect that people often forget is it only works well in read-only data. If it is a table with lots of insert, update, and delete operation, you end up having to lock many rows at once for each of the DML

Oracle and NetBeans

Omar Tazi - Thu, 2006-01-19 21:00
Following the Sun-Oracle town hall meeting last week at Oracle headquarters where Larry and Scott made a few exciting announcements, I started getting questions about Oracle's position vis-a-vis NetBeans. The reason is that Scott (and later Jonathan Schwartz on his blog) mentioned some kind Oracle "adoption and endorsement" of NetBeans.

Oracle's IDE strategy is very clear, Thomas Kurian's interview on OTN earlier this week doesn't leave much room for interpretation and at the moment Oracle's tools strategy is limited to JDeveloper and Eclipse. Here is the statement from Thomas, Oracle's Senior Vice President for Oracle Fusion Middleware:

"At Oracle, we have our own development tool, Oracle JDeveloper, which is available for free download. Our new version, JDeveloper 10
g Release 3, has an extensive list of new features and is the single biggest release we have ever done of the product…

...Because we are committed to providing developers with choice, we are also taking a leadership role within the Eclipse community. We are currently leading three different groups within the Eclipse Foundation for Java and BPEL technologies, and we are actively involved in integrating our Fusion Middleware products with Eclipse. Oracle is focused on JDeveloper and Eclipse. We certainly think Sun's NetBeans initiative is important in the marketplace, and we're watching it very closely. But as of right now, Oracle is focused on JDeveloper and Eclipse and we have no plans to adopt either NetBeans or any of its technology. Any statements to the contrary by anyone else in the industry are not true."

Is open source software more vulnerable?

Omar Tazi - Tue, 2006-01-17 19:23

Do you think that more eye balls looking at open source projects make all bugs shallow or quite the contrary that some of these eye balls looking at the code could be malicious and take advantage of the exposed code to attack your open source based systems?

Linus Torvalds, the creator of Linux, stated: "given enough eyeballs, all bugs are shallow". More formally: "Given a large enough beta-tester and co-developer base, almost every problem will be characterized quickly and the fix obvious to someone." by Eric S. Raymond in his essay The Cathedral and the Bazaar.

Apparently The U.S. government's Department of Homeland Security thinks otherwise. It is investing in an ambitious 3 year project aiming at improving reliability and security of widely deployed open source projects. In late 2004 the San Francisco based auditing software company Coverity found that the Linux kernel had far fewer security vulnerabilities than a typical commercial software package. According to this article, this same company was selected for this project along with engineers from Stanford and anti-virus vendor Symantec to pinpoint and fix dangerous vulnerabilities (such as buffer overflows and memory allocation bugs) in widely used open source projects such as Linux, Apache, Mozilla and Sendmail.

Can't wait to see the results of this project will confirm Linus' law or not. In my opinion, there is no general rule in this case. Open source is not safer nor is it more vulnerable than commercial software. It really depends on what we are comparing. An open source project is going to be more or less reliable based on its popularity (nobody was interested in attacking Firefox until it became successful) the governance behind it, the size of the community (the more the better)...

Solaris & Tamil

Siva Doe - Mon, 2006-01-16 15:46

Ever since I saw the multi language capabilities of KDE (back in 1997/1998), I wanted to have my desktop at work to be in Tamil, my mother tongue. I then become the Tamil language coordinator and worked to get an Indic language officially release part of KDE 2.0.1. Even though it was easy(ier) in Linux, seeing Tamil on Solaris/sparc had been a challenge always and my passion.
Now with Sun behind GNOME, in my spare time, I try to make Tamil work on Solaris (sparc, in particular). Like, compiling the GTK2-IM modules for Tamil in my workstation or compiling my own version of Firefox with --enable-pango. Without this option, Tamil Unicode websites (like http://ta.wikipedia.org) does not render correctly. My request to enable this by default in Solaris contrib builds has been shot down though.
I can now read and write (With setting GTK_IM_MODULE=tamilvp_uni) in Tamil, in the GNOME desktop as well as in Firefox (like this blog, even though there are some bugs)

தமிழ் படிக்க தெரிந்த அனைவருக்கும் எனது வணக்கங்கள்!!
அனைவருக்கும எனது இனிய பொங்கல் வாழ்த்துக்கள்!!


Blogging at last...

Adam Winer - Fri, 2006-01-06 15:21
It seems about time that I throw my hat into the ring and give blogging a whirl. There should be plenty to say, what with ADF Faces joining MyFaces (though the name's not going to be Cherokee), and anyone who's met me knows I'm never at a loss for opinions.

First post - Daily Links

Siva Doe - Mon, 2006-01-02 16:04

Hello world! (What else)

This is my first post. For filling up this text, I am listing some of the sites that I visit almost daily (after checking Sun mails, of course).

http://www.gnome-look.org (latest fav theme is VistaBut)
http://antwrp.gsfc.nasa.gov/apod (astronomy pic of the day)

Thats all for now, folks.


Torrent available for download... [non-Oracle]

Denis Goddard - Fri, 2005-12-30 16:54
Over the past few months, I've put together a DVD image of video clips relating to the Free State Project:
TV news shows, footage of goings-on in New Hampshire, and so forth.

The DVD image is freely available via BitTorrent.

First, you need a BitTorrent client. I've found Azureus to be the best one by a long mile:

Once you've downloaded and installed Azureus (or if you already have a BitTorrent client), just click on:
If the link above doesn't work or the site is down, you can try:

Included in the download is a README.TXT file with info on how to burn DVDs if you've never done this sort of thing before.

This being BitTorrent, the more people that download, the faster it goes for everyone!

If you run into any trouble, or have any feedback, please post a comment here.
I'll answer questions as best I can, and am always looking for suggestions for the next cut of the DVD.

Share and Enjoy!

... so the Maples formed a union, and demanded equal rights
These Oaks are just too greedy, we will make them give us light!
Now there's no more Oak oppression, for they passed a noble Law
and the Trees are all kept equal
by hatchet,
and saw

Another Oracle Donation to Open Source

Omar Tazi - Wed, 2005-12-21 19:38

This is exciting news web developers who believe in J2EE, so buckle up!

I am pleased to announce that Oracle is contributing a rich set of UI components based on the JavaServer Faces specification to the Apache Software Foundation under the Apache 2.0 license. The donation was originally part of Oracle ADF. What it will be called in the future is yet to be determined by the Apache MyFaces community.

What's in it for Oracle?

We like to get behind technologies we believe in. We think JSF holds great promise and Apache MyFaces is a great JSR-127 implementation. By supporting JSF and MyFaces we are hoping that more vendors are going to join us and strengthen the Faces community.

Why should I care?

I would say wait till you try it. This is going to give a big boost to the JavaServer Faces technology as well as the MyFaces project. The donated code comes with great functionality out of the box. How would you like to have high quality capabilities such as: file upload support, client-side validation, partial rendering of a page (AJAX-style), data tables, hierarchical tables, color/date pickers, progress indicators, menu tabs/buttons, internationalization and accessibility? This donation starts with more than 100 components which have already been thoroughly tested and come with high quality documentation.

How about tools?

Oracle developers are also leading the Eclipse JSF tooling project, we are going to make sure that this plug-in works well with MyFaces and its components to help J2EE developers develop and deploy great looking web applications using open source technology donated by Oracle.

After several months of effort, I'm very excited to see this donation go forward. We know that our donation is being placed in very good hands, and we look forward to seeing more components "blossom" as part of the Apache MyFaces project.

I'm Back!

Omar Tazi - Wed, 2005-12-21 19:29

I would like to apologize to my readers for being so quiet for the last couple of months. I've been too busy and on the road quite a bit. I had a chance to speak at the Gartner Open Source Summit in Florida as well as ApacheCon in San Diego. I hope you like the news in my next blog entry!

Comparing SDO and EJB 3

Mike Keith - Tue, 2005-12-20 23:35

There was a recent announcement made by a consortium of companies about SCA and SDO that can be found here. I have since been getting a few questions about what this means to EJB 3.0 and what the differences between SDO and EJB 3.0 are. There are also some misunderstandings and misinterpretings about what this implies with respect to continued support of the Java EE platform by these companies.

First off, to ensure the message is crystal clear, this does not mean that any of these companies are abandoning or reducing their support for the Java platform. SCA and SDO are complimentary technologies to Java EE, not competitors to them. They are geared towards SOA architectures in general as opposed to Java-specific web services, so in many ways they are generalizations of the model but with concrete API's. EJB components fit well into the SCA component model, and EJB persistence would do well to sit underneath the binding layer of SDO at the Data Access Service (DAS) layer. The companies that are involved in these specifications have all shown their strong support for Java EE and to the best of my knowledge (I can't speak for all of the companies, of course) have no plans to change that level of support.

Here are a few of the notable differences between the specs:

· SDO is the basis for an overall architecture while the EJB 3 Persistence API is simply what its name implies -- a persistence technology. SDO is the basis for an architecture because it does not cover all of the components that would be required for a complete platform. It seems to have been designed more for the upper application architecture layers, like SOA, but leaves all of the specific underlying technologies (except for XML!) unspecified. Services such as Data Access Services are mentioned, but are abstract. Other things such as transactions are not even mentioned. EJB 3, although not at the lowest level as something like JDBC, is definitely lower down on the technology stack.

· SDO is driven by a meta-model and has a very reflection-oriented look and feel. Its API's on DataObjects and DataGraphs offer reflective access of type and property metadata as well as concrete instance data. EJB has no meta-level API's. Entities are concrete and used by applications as simple unadorned Java objects, offering whatever they natively support as part of their domain level API.

· A great deal of effort, and most of the specification, deals with mapping between XML and the data objects. This is in keeping with its SOA focus and its attempts to be interoperable. Mappings to and from the XML may be generated in both directions. EJB does not have make any special considerations for interoperability, except as defined by underlying protocols such as IIOP and CORBA protocols that may be used by the application for communicating the objects.

· Objects in SDO are self-managing because they are always wrapping the actual domain data, even when they are detached. A DataObject or DataGraph is the surface object so wherever the object or object graph goes the operations are getting invoked on those wrapper objects. EJB entities are managed only when they are attached to an EntityManager. Only when operating on managed entities are the objects potentially wrapped. When objects become reattached is when the processing comes back into play to calculate changes and so forth. The difference is that SDO retains the heavier but more controlled objects throughout their entire life cycles, whereas EJB 3 entities are POJO's of the simplest kind if they become unmanaged.

· Object traversal in SDO is done using Xpath queries. This provides the abstraction to navigate through the various wrappers without having to issue all of the unwrapping calls at each level. EJB 3 objects are POJO's and are thus directly traversed using the domain API. The SDO model actually feels a little like the OODB's of old. There is no querying of objects except by traversal, as part of an XPath query or directly from one object to the next. It is unclear what the specified way of causing objects to be loaded on demand during traversal is (whether the DataGraph is supposed to go back to the DAS to get DataObjects that are not loaded).

Disabling CPUs on Linux- Part Two

Stefan Roesch - Sat, 2005-12-17 16:10
If the server is supporting Hyperthreading, Linux implements the following mechanism: First all the physical CPU's are enabled and then then the logical CPU's are enabledThis means that all the possible combinations can be enabled by specifying the maxcpu parameter in the boot command mentioned in the earlier post. For instance if the server has more than one physical CPU it is not possible to stefan roeschhttp://www.blogger.com/profile/15182787826739074738noreply@blogger.com2

Granularity of CPU statistics in V$SERVICE_STATS

Stefan Roesch - Tue, 2005-12-13 23:04
After making several tests it turns out that the "DB CPU" statistics in the view V$SERVICE_STATS only has a granularity of centiseconds despite what the documentation says.stefan roeschhttp://www.blogger.com/profile/15182787826739074738noreply@blogger.com1


Subscribe to Oracle FAQ aggregator