Weblog

JDeveloper 10.1.3.3

Oracle just released JDeveloper 10.1.3.3.. I just checked the list of fixes, didn’t see anything that was causing me headaches. Yesterday we did run into some weird JBO exceptions while selecting entire objects from a selectonechoice into a pagedef variable, i assume it’s caused by a bug, but i don’t think it’s on the list. I’ll try after i’ve downloaded it.

Apple iPhone Day

Today is the big day that people will be able to buy the Apple iPhone. Unfortunately, people in Europe will have to wait a couple more months. So what’s this got to do with Oracle or Java? Not much. But one thing people have complained about regarding the iPhone is that you can’t install applications on it. The iPhone will come with a full Ajax compatible browser, Safari, and if you want to deliver applications to the iPhone you’ll need to create a web application. People developing with ADF Faces may have an advantage here, as ADF Faces has a render kit for PDA’s. iPhone Safari should be able to render any website, but you’ll still need to consider the small screen, and the bandwidth limits. So a render kit which does this for you might save you time.

With the iPhone Apple is getting into a very crowded market, with a lot less freedom to execute than in the pc market. Apple will have to make deals with telecom providers. But i think even from a pc vendor perspective making mobile phones is inevitable. In a couple of years mobile phones will be powerful enough to replace laptops for most common computing usages. You won’t need a separate laptop. You walk around with your mobile phone, in the office or at home you put it in a docking station, attach a keyboard and a bigger display, and you have all the computing power you need. But this will only work if you can install applications on it or if you can remotely run applications on it, for example using remote desktop, some sort of remove vmware ace.

Amazon and SOA

ZDnet has an interesting piece on the use of SOA at Amazon: SOA done right: the Amazon strategy. It’s a summary of a presentation at the Google Seattle Scalability Conference. Although the article is a bit light on details, it does contain some interesting info.

Amazon is a big user of SOA:

Every Amazon web page calls on at least 150 services.

150 seems like a lot, although every page at Amazon does contain a lot of information. It be interesting to know what these services are used for.

The article then goes on to state that you need to have SLA’s for your services:

resource sharing without contracts kills scaling

Rene Wiersma recently posted a message on this subject: SOA Best Practices # 5: Determine SLA’s listing some items which we think need to be in the SLA of a service. The Amazon article mentions the following:

The contract covers what the service promises against certain demand levels. The key is that both the demand side and the supply side are covered by the contract.

One final quote i would like to share:

Saving state to a database guarantees scaling failure.

I hope the presentation will be on youtube soon, worth watching.

Update:
This article has some details on Amazon’s SOA use: A Conversation with Werner Vogels

Oracle Business Intelligence Standard Edition One: BI on a budget

Introduction

Oracle launched on June 12th, 2007, the long anticipated release of the Oracle Business Intelligence Standard Edition One Suite. It concerns the release 10.1.3.2.1 and this version number is on par with the OBI EE Suite. Just like the other Oracle Standard Edition One offerings this release seems to be a good offer. Not only includes this release a series of very promising tools, but what’s more, the pricing is just above that of the OBI Standard Edition (the release without the “One”). So the question would be: are there any drawbacks to this offer?

The Offer

Let’s start with a complete list of features of the different suites
Table 1: What you get

Tool Oracle Business Intelligence Suite Standard Edition v.10.1.2.0.2 Oracle Business Intelligence Suite Standard Edition One v. 10.1.3.2.1 Oracle Business Intelligence Suite Enterprise Edition, v. 10.1.3.2.1
Ad-hoc reporting - Oracle Business Intelligence Discoverer - Oracle BI Answers
- Oracle BI Server
- Oracle BI Interactive Dashboards
- Oracle BI Administrator
- Oracle BI Answers
- Oracle BI Server
- Oracle BI Interactive Dashboards
- Oracle BI Administrator
- Oracle BI Delivers
- Oracle BI Office Plug-in
Distributed reporting - Oracle Application Server Reports Services - Oracle BI Publisher - Oracle BI Publisher
Offline reporting - Oracle BI Disconnected
- Oracle BI Briefing Books
Scheduling - Oracle BI Scheduler
Web server - Oracle HTTP Server
- Oracle Application Server Containers for J2EE (OC4J)
- Oracle Application Server Web Cache
- Oracle Application Server Containers for J2EE (OC4J) - Oracle Application Server Containers for J2EE (OC4J)
Management Tools - Oracle Enterprise Manager 10g Application Server Control
Database - Oracle Database Standard Edition One
ETL - Oracle Warehouse Builder (Core ETL) *

* = OWB Core ETL is a part of the database since May 2006 and no longer a part of the Internet Developers Suite.

In the above table you can see that the OBI SE Suite consists of the “old” Oracle BI tools. The OBI EE Suite is completely assembled of the old Siebel Analytic Tools. And the OBI SE One Suite offers just a bit of everything, combined with a database and Oracle Warehouse Builder. Unfortunately, there are some limitations. For example, the database can only be used on a server with a maximum of 2 CPU’s. OWB contains only the Core ETL version. And Core ETL Features corresponds largely with the previous release of OWB (release 10G R1). So features like data pump, transportable table spaces, target load ordering and RAC system support are missing. These are the so-called Enterprise ETL features. Also missing are data profiling and other data quality features. Finally the ERP/CRM connectivity is missing. You won’t have connectors for SAP, People soft and the E-Business suite. For the reporting part, you will be missing the BI Scheduler and the possibility to have off-line reporting. But is this a real problem?

Everyday use

In every day use, my experience is that the use of the different tools is restraint to the features which are part of the OBI SE One Suite. Usually, people develop a Business Model in the BI administrator, then reports are developed in BI Answers and those reports assembled in a dashboard with the help of BI Dashboards. 95% of the enterprises won’t need off-line reporting, since everyone is connected to the enterprise servers. Same applies for report scheduling. In my view, report scheduling is too often a sign of bad architecture and bad business modeling and has no connection to the real purpose of scheduling that is to have a report on a certain moment.
What people really use is reporting for external purposes. Composing of calculations or invoices can be done with the BI Publisher. And developing and running of data warehouse ETL can be done with Core ETL. After all, OWB 10G R1 and the Oracle Database 10G served in a perfect way before and will be doing it now. Happily, both are part of the OBI SE One Suite.

And what about OBI SE?

This version of the Oracle BI tools hasn’t finished yet. Companies who are working with Oracle Discoverer and Oracle Reports can continue in doing so. Both are proven technology; for both there will be a continued development and both will be supported by Oracle. Oracle just made an announcement about the Lifetime Support of Oracle Discoverer.
But for companies who want to be ready for the future, there is no escaping from Oracle Analytics. One day in the far future, support for Discoverer10G will stop, just like it did for 9i or 4i. And although Oracle is working on a migration and upgrade path from Discoverer to Analytics, it is recommended to make this migration step in an early stage. After all: Reports developed with Analytics don’t need to be migrated anymore.

Pricing

Now here is the fun part. See table2, below. The price of the OBI SE One Suite is considerably below the price of the OBI EE Suite. And with prices as low as 3700 Euros (minimum price), it’s just above the price of the OBI SE Suite (2960 Euros, minimum price). But as mentioned above: the OBI SE One Suite integrates a database. Would you add this database to the SE Suite, the price would rise with another 550 Euros (minimum price). The resulting price difference is marginal with 190 Euros. Off course the difference would increase with the number of users.
Table2: pricing (all prices are based on information of Oracle the Netherlands)

License fee Oracle Business Intelligence Suite Standard Edition v.10.1.2.0.2 Oracle Business Intelligence Suite Standard Edition One v. 10.1.3.2.1 Oracle Business Intelligence Suite Enterprise Edition, v. 10.1.3.2.1
Named user € 296 €748 € 1110
Minimum number of users 10 Named Users Plus per Processor 5 50
Per CPU € 14806 €166568
Conditions Max 2 CPU
Minimum price € 2960 € 3700 € 55500

Example:
Corporation with 50 BI users, database is Oracle Database Standard Edition One and it is running on a 2 CPU server.

OBI SE suite:

50 named user licenses at € 296 for the OBI SE Suite € 14800,-
50 named user licenses at € 110 for de database € 5500,-
Total € 20300,-

OBI SE One suite:

50 named user licenses at € 748 for the OBI SE One Suite € 37400,-
0 named user licenses at € 0 for de database € 0,-
Total € 37400,-

OBI EE suite:

50 named user licenses at € 1110 for the OBI EE Suite € 55500,-
50 named user licenses at €110 for de database € 5550,-
Total € 61000,-

The OBI SE Suite is the cheapest one of all. But the difference in price between OBI SE One and OBI SE One is not that big. And the real challenge: the OBI EE Suite is considerably more expensive. Oracle itself targets the small and medium large companies with the OBI SE One Suite. And I think it’s a bull’s eye. But perhaps OBI SE One is also interesting for companies which are larger than medium large. Analytics doesn’t require very much hardware (memory is the most important part). And for the database: Oracle has a “50 concurrent users per CPU” rule of thump. But in a data warehouse environment with a 2 CPU server this means 200 to 400 BI users. Because not all the users will require performance from this database at the same time. And a number of 400 BI users mean a company with up to 1000 employees. That is not a medium large company anymore.

Final thoughts

When a company wants to renew its BI-licenses, this company is confronted with a couple of questions. First: continue with Oracle Discoverer or not. If the company wants to migrate from Oracle Discoverer, then there is the choice of the OBI SE One or the OBI EE Suite. Depending on the needs, choices will be made. But my estimation is that the need 95% of the companies will be satisfied by the OBI SE One Suite. So the true winner in Oracle BI country is your company.

Real BI on a real budget!

Urls:
OBI SE One at Oracle
OBI SE One Download
OBI SE One documentation

SOA Best Practices # 5: Determine SLA’s

Mostly, a service is only defined by its interface. That is sufficient to connect to the service from technical perspective only, but insufficient to work with the service appropriate. That is exactly why each service needs a Service Level Agreement, in which the use of the service or the constraints of the service, etc are described.
The Service Level Agreement has to be descriptive on the service, in case of functional and non functional requirements.

Items below should absolutely be part of the Service Level Agreement:

  • Type of interpretation, what is meant by a particular code, like code 1 or code 10.
  • Interface unit, what is the required unit of currency in this interface. For example USD or EUR or some other currency.
  • Synchronization, in case of blocking, locking of certain data structures.
  • Quality, like the average response time of the service request.
  • Infrastructure load, like the use of memory, network traffic load, used ports etc.
  • Database actions, like some insert, update or delete actions that will be executed against the dataset.
  • Ownership, like a change log in the code of the service in importance to the service life cycle.
  • Other linked services, which other service requests, are being executed if the current service is requested. On purpose of nested service hierarchy.

More XQuery examples

Before i show you some more xquery examples, i found a page at oracle.com which illustrates the use of xquery without XMLDB. But it looks like it uses a newer release of xquery than available in JDeveloper 10.1.3.2. The xquery library in 10.1.3.2 doesn’t use a XQueryResultSet.

The following example displays how to use variables with xquery:

XQueryContext ctx = new XQueryContext();

String query =
    "declare variable $title external; " +
    "for $i in doc('file:///c:/temp/books.xml')//book " +
    "where $i/title/text() = $title " +
    "return $i";
PreparedXQuery xquery = ctx.prepareXQuery(query);
xquery.setString(new QName("title"), "Xml primer");
XMLSequence seq = xquery.executeQuery();
while (seq.next()) {
    XMLItem item = seq.getCurrentItem();
    item.getNode().print(System.out);
}

Using external variables you can also specify the xml document that you want to query:

XQueryContext ctx = new XQueryContext();

String query =
    "declare variable $doc external; " +
    "declare variable $title external; " +
    "for $i in doc($doc)//book " +
    "where $i/title/text() = $title " +
    "return $i";
PreparedXQuery xquery = ctx.prepareXQuery(query);
xquery.setString(new QName("doc"), "file:///c:/temp/books.xml");
xquery.setString(new QName("title"), "Xml primer");
XMLSequence seq = xquery.executeQuery();
while (seq.next()) {
    XMLItem item = seq.getCurrentItem();
    item.getNode().print(System.out);
}

If you want to query a dom tree:

XQueryContext ctx = new XQueryContext();

String query =
   "declare variable $title external; " +
   "for $i in .//book " +
   "where $i/title/text() = $title " +
   "return $i";
PreparedXQuery xquery = ctx.prepareXQuery(query);
xquery.setString(new QName("title"), "Xml primer");

// parse input document
DOMParser parser = new DOMParser();
parser.parse(new URL("file:///c:/temp/books.xml"));

// set context document
OXMLItem xmlItem = xquery.createItem();
xmlItem.setNode((XMLNode)parser.getDocument().getDocumentElement());
xquery.setContextItem(xmlItem);

// get result
XMLSequence seq = xquery.executeQuery();
while (seq.next()) {
    XMLItem item = seq.getCurrentItem();
    item.getNode().print(System.out);
}

Using Oracle’s XQuery without a database

Did you know you can use Oracle’s Java XQuery library without a database? I wasn’t aware that it was possible. All the examples i know show you how to use XQuery in combination with XMLDB. But JDeveloper contains an XQuery library which you can use in any java program. The library you need is ‘Oracle Xquery‘, which is available in $JDEV_HOME/lib/xquery.jar.

Here are some examples how you can use it:

XQueryContext ctx = new XQueryContext();

String query =
   "for $i " +
   "in <doc><row>text1</row><row>text2</row><row>text3</row></doc>//row " +
   "where $i/text() = 'text2' " +
   "return $i";

PreparedXQuery xquery = ctx.prepareXQuery(query);
XMLSequence seq = xquery.executeQuery();

while (seq.next()) {
  XMLItem item = seq.getCurrentItem();
  item.getNode().print(System.out);
}

Here’s another example which queries an external xml document:

XQueryContext ctx = new XQueryContext();

String query =
  "for $i " +
  "in doc('file:///c:/temp/books.xml')//book " +
  "where $i/title/text() = 'Xml primer' " +
  "return $i";

PreparedXQuery xquery = ctx.prepareXQuery(query);
XMLSequence seq = xquery.executeQuery();

while (seq.next()) {
  XMLItem item = seq.getCurrentItem();
  item.getNode().print(System.out);
}

Can’t add entity methods to your session bean?

I took me a few minutes this afternoon to figure this one out. JDeveloper can automatically generate EJB3 session beans for you that have methods to work with entity objects by selecting ‘generate session facade methods‘. These are the normal methods you need to insert, remove, and query entities. Later when you’ve added some entity beans you can select ‘edit session facade‘ in the context menu of the session bean, to add facade methods for the new entities.

But somehow, this afternoon, no new methods were displayed for my new entities. Why? All source files compiles, all the required annotations were added to the entities, but no session facade methods were suggested in the ‘specify session facade options‘ window.

Turns out that the persistency unit being used by the session bean ,as specified by the @PersistenceContext(unitName=”model”) annotation, didn’t contain class elements for all the new classes. If you use JPA in-container you don’t have to add all these classes to the persistency unit configuration, but if you have an out-of-container configuration, you need to. Not just at runtime, but also at design time.

So, after adding the new classes to the persistence.xml file, i could use jdeveloper to generate facade methods in my session bean.

Running a single test in a unit TestCase

Did you know that it’s very easy to run a single test in a unit TestCase with JDeveloper? Open the TestCase in the structure view, select the method you want to run, right mouse button, select Run. You can also debug a single test the same way.

Run junit test in jdeveloper

SOA best practice #9: Use a Canonical Data Model

The Canonical Data Model pattern is very useful for soa projects. You can find a thorough description of it in Enterprise Integration Pattern (pages 355-360). The goal of this pattern is:

How can you minimize dependencies when integrating applications that use different data formats? …Design a Canonical Data Model that is independent from any specific application. Require each application to produce and consume messages in this common format

EAI tools use canonical models heavily. In a hub and spoke integration solution all messages are first translated into an application independent message format and then into the required format. This way you have less dependencies than in a peer-to-peer integration approach. It’s easier to add new applications if all you have to do is add a translation from a new application to the common model and back.

How does this work on a soa project? The integration functionality, often implemented using bpel processes, is a integration layer which communicates at it’s edges with all sorts of services. These services may internally use all sorts of formats, but your bpel processes shouldn’t be bothered with this. You need to keep this complexity outside your bpel business processes. This means you need to transform the messages to a common message format. This is best done by transforming the messages to a common data format. Either by using an ESB or by creating some custom code.

What you are basically creating is a layer between your integration processes and the services, a transformation or mediation layer. The integration layer is used to define business processes on top of heterogeneous services, the transformation layer is used to hide the heterogeneousness of the services to the integration layer.

Technology
Ben jij slim genoeg voor IT-eye