Author Archive

Report from Oracle world 2007

Lonneke Dikmans December 21st, 2007

Last month, Amis organized a Knowledge Center session on Oracle OpenWorld 2007. Approach Alliance participated in the event: I reported about ODI & Oracle BPA Suite. The Amis consultants Peter, Sjoerd, Lucas and Harm talked about the overall impression, Event driven development, Coherence, SCA etc. It was a very interactive, pleasant evening. If you missed it, or would like to review what was discussed there, you can download the presentations from the Amis site.

Read more...
Comments Off

Password hardcoded in JMS Adapter on OC4J

Lonneke Dikmans December 15th, 2007

One of the problems when you develop components in a service oriented architecture, is dealing with hard coded settings. When you invoke a webservice, you need to tell the client where it can find the service. This means hard coding the endpoint. When the application is ready to be promoted to the testing environment, you need to change this. In production it gets even worse: when an administrator decides to move a service, every client that uses it is in trouble. It gets worse when you use security: you need to authenticate and usually the passwords differ between development, test and production environments (at least they should).
That is one nice things of an Enterprise Service Bus: it abstracts endpoints from the clients. I was fiddling around with a JMS Adapter in an Oracle ESB project when I ran into a weird problem. The adapter failed with the message:


The Adapter Framework was unable to establish an outbound JCA connection due to the following issue: ORABPEL-12133
ERRJMS_JMS_EXCEP.
Unable to create JMS connection due to JMS exception.
Please examine the log file to determine the problem.
[Caused by: JMSServer[XP-LDIKMANS:12601]: failed to authenticate "oc4jadmin/welcome1" via "[ JAZNUserAdaptor: user=oc4jadmin] ".]
; nested exception is:
ORABPEL-12511
.....
etc

When I installed the SOA Suite (10.1.3.1) on my laptop, I changed the password for oc4jadmin from welcome1 to something I like better. It does not make sense that adapters that are installed by default don’t inherit the new password. It still had the old one!

To fix this, you can simply edit the password of the JmsAdapter:

  • Log in to the enterprise manager console
  • Click on the container where the soa suite is installed
  • Click on the default application
  • Click on JmsAdapter from the modules list
  • Click on Administration
  • Select the eis/Jms/TopicConnectionFactory from the list
  • Change the password so it matches the password of oc4jadmin
  • Click apply

This fixed the problem. The weird thing is that connection settings are also stored in the wsdl endpoint:

<service name="AcmeJMSAdapter">
<port name="Produce_Message_pt"
binding="tns:Produce_Message_binding">
<jca:address location=/
"eis/Jms/TopicConnectionFactory"
UIConnectionName="appServerSOA"
....
mcf.Username="oc4jadmin"
mcf.Password=[encoded_password]
UIJmsProvider="OC4JJMS" />
</port>
</service>

Apparently these are only used design time and not runtime. This is a good thing (because of the reasons I mentioned before), but it makes it very hard to find problems like these.

Read more...
Comments Off

Automated build & deployment in OC4J 11g

Lonneke Dikmans November 28th, 2007

Automated build & deployment is very important. Not only is it a condition for continuous integration, it helps prevent costly errors during development and build promotion.

Now pretty soon (hmmm, well, next year at least ;-) , we will have this new Oracle stack: Oracle Fusion Middleware 11g. A lot of improvements, not only in ADF and SOA Suite, but also in the management of the application server and the different suites. One of the downsides is that you need to rewrite (and maybe re-consider) your existing automated build and deployment solutions. A lot of stuff has changed, the JMX interface for example. I wondered about the ant tasks….

I decided to write a very tiny ADF BC application in JDeveloper11g tp2 and deploy it to the standalone OC4J11g (Preview). Right away I ran into a problem: the runtime installer does not work (yet). Luckily, Steve Muench wrote a technote that explains how to fix that. It is written in May 2007, for preview 1. In preview 2, some of the libraries have ‘disappeared’. If you are following the steps that are described in the technote, you can skip copying %JDEV_HOME%\BC4J\lib\adfrcutils.jar and %JDEV_HOME%\BC4J\lib\connmbean.jar; they are no longer there.

Next I needed some tool to automate the build and deploy process. Since the Oracle application server and SOA Suite support Ant driven deployment, I decided to go with that for the deploy tasks. I wondered if I could still use the deployment task from the previous version as described in the deployment guide for version 10g.

To test it, I deployed the ADF BC application to an ear file in JDeveloper11gtp (I will get to build tools later in this blog), and ran the following ant task:

<target name="deploy" depends="init" >
<oracle :deploy userid="${oc4j.admin.user}"
password="${oc4j.admin.password}"
file="${deploy.dir}/${ear.file}"
deploymentname="${app.name}-ear"
logfile="${log.dir}/deploy-ear.log"/>
<oracle :bindWebApp
userid="${oc4j.admin.user}"
password="${oc4j.admin.password}"
deploymentname="${app.name}-ear" webmodule="${app.name}-webapp"
websitename="${oc4j.binding.module}"
contextroot="/${app.name}" />
</target>

It works fine. The nice thing about JDeveloper11g is that the resources are project specific. This means that now the deployment profile for an ear file, will only take the connection that you need for this application. Not every connection that you have ever stored in the IDE.
Still, I don’t like to use the deployment profiles from JDeveloper. Managing the dependencies that are needed for your application(s) is really difficult. This gets worse if you have several different projects and workspaces. If want to do continuous integration you need ant or maven, or some other tool.
Ant soon becomes unmanageable when you have several artifacts and a lot of libraries. I had good experiences with Maven in the past, so I decided to have a go with Maven2.

There is a very nice post by Aino Andriesen on the Amis weblog. Unfortunately, the libraries that ADF uses have changed. This means you need to do some work to get them all listed in your pom.

  • create a directory structure as described by Aino
  • create an ant build file based on the project in JDeveloper. This will point you to all the jar files that are used by the webapplication. You don’t need to package all these files, these are the standard libraries needed to compile any ADF BC application
  • add the jar files that end up in the ear file generated by JDeveloper deployment profiles as dependencies to the pom
  • add the jar files to your local repository. You can use the following command for that: mvn install:install-file -Dfile=[path-to-file] -DgroupId=[group-id] -DartifactId=[artifact-id] -Dversion=[version] -Dpackaging=jar
  • add the ant deployment task with Antrun plugin

You are done. If anyone is interested in getting the pom, just leave a comment and I will send it to you. All in all not so painful after all!

openworld07 – “Stateless systems scale because they don’t do anything”

Lonneke Dikmans November 15th, 2007

Today was the best day so far at open world. At the demo grounds, I talked to Steve Button about scripting deployment and other administration tasks with groovy, I talked to Roman Dobrik about the new SCA stuff in Oracle 11g, and to Shaun Smith about EclipseLink and the database webservice they plan to put in. Apart from all that, I saw a couple of pretty cool sessions. First of all, Cameron Purdy talked about Coherence. The presentation he gave was similar to the one on Oracle Develop. I did not mind hearing it again. One of the interesting thoughts in the presentation was that middle tiers scale because they don’t have state (“they don’t do anything”). State is stored in the database and this pretty soon becomes a bottleneck. The solution is moving the data closer to the operations in a scalable and reliable way. That’s where Coherence comes in. This fits perfectly with what David Chapell is saying about the SOA grid. It is great to see that the cool ideas from an acquisition make their way into the other product groups. The last session I visited today was titled “Oracle Solutions for SOA Governance”. This session gave a good overview of Oracle’s view on governance and SOA maturity. The second part of the presentation was about the tools in the SOA suite stack that are available right now (Oracle Web Service Manager, Registry) and the new stuff that will be there in Oracle 11g. One of the interesting concepts is that of a Unified Repository. In this repository you can store artifacts like WSDLs, XSDs and other stuff. This way you can do a impact analysis on your assets in a SOA architecture. This is very important, considering that everything in a SOA is loosely coupled (or is supposed to be) and it becomes harder and harder to do configuration management and other ITIL processes. Apart from that, it is a nice place to store your canonical datamodel (XSD’s). The day ended with the party in the Cowpalace. A perfect ending for a perfect day.

Read more...
Comments Off

openworld07- Oracle and Open Source

Lonneke Dikmans November 14th, 2007

Another fun day at Oracle open world. I was invited to the Editors Choice Award lunch. I had a great time there, talking to people from all over the world about Oracle, different cultures, and food (eating kangaroos for example).
After that I went to a session about Eclipse Link. This presentation was one of only seven presentations covering open source at OpenWorld.
EclipseLink has the following scope:

  • JPA with extensions that we know from TopLink (for example JoinFetch, and support for OLS and VPD)
  • MOXy (mapping objects to XML using JAXB)
  • SDO if you are more XML centric
  • EIS mappings using JCA for non relational and non XML mappings
  • Database webservice mapping XML to relational data using the OR and OX mappings

This last feature is not supported yet, but is planned. I don’t think the name is very well picked: it reminds me of the new feature of the Oracle 11g database where you can have a webservice run natively in the database. Database webservice in EclpseLink is nothing like that. To me it sounds more like the Database Adapters that we know from the Oracle ESB and Oracle BPEL. I think it is a great idea to put that EclipseLink. This way, you can use this functionality, without having to use the ESB infrastructure.
I do wonder about the relationship between this project and the SOA tools project that is in Eclipse as well. If you go to the osoa site and look for SDO implementations, you won’t find eclipseLink. Maybe because it is still in incubation? It does list the SOA tools project. It would be nice if some of the features of eclipseLink could be used in the SOA tools project, like the database webservice and the SDO features. But there is also a relationship between eclipseLink and Dali. You could use Dali to do the mapping of your JPA stuff. I guess the confusion arises from the fact that all of sudden there is a runtime library in the eclipse open source stack. To me, eclipse is an open source IDE not a repository for open source runtimes. I guess I will have to get used to that, because there are plenty of cool features in EclipseLink!

Read more...
Comments Off

openworld07- Declarative code is not cool, coherence is!

Lonneke Dikmans November 13th, 2007

Today Thomas Kurian opened Oracle Develop with a lot of cool demos. One of the features of JDeveloper and its frameworks is the concept of declarative programming.
In my opinion, declarative has two potential advantages:

  1. You can configure your application @design time, you don’t need to write code and compile it. This is very useful for user interface programming
  2. You can configure your application @runtime, so you can change something without redeploying it. This can be used for all sorts of things: webservice endpoints, datasources etc etc.

In the past, when JSP’s did not exist yet, you had to write code that wrote HTML to an output stream. This was very painful. You need to be able to visualize the result of the enormous amount of code, when you write it. It is even harder to change it.
Having a framework like ADF, where you can visually design your user interface by dragging and dropping components is a huge improvement. There are some downsides, however. One of them is that the code is not portable. I can take my java code from JDeveloper to Eclipse and vice versa. I can’t do the same with my meta data files. Another problem is testing declarative code. It is much harder to test a JSF page with datacontrols, then it is to test ‘regular’ java code. Maintaining the code is also harder, refactoring capabilities in declarative code are usually more error prone than in Java code.
The last problem with the declarative paradigm is that is not cool at all! Developers like to write code. Eclipse is popular, not just because it is open source, but because it has a great code editor…..it is a cool tool…..
Fortunately, Oracle recently acquired a product with a very high cool factor: Coherence. It is not declarative, it is an object cache that uses Java. Whenever you talk to someone who saw a demo or a presentation, they think it is the coolest thing. Everybody wants to use it for everything: we can use it for high availability (HA), as a SOA grid, as a cache, for analytics, etc etc.
That’s the problem with cool things: you want to use it, not because you need it, but because you can. Tomorrow, I will attend a hands-on session about coherence with TopLink, I think it is very cool. And I actually think it could be very useful in the SOA suite, as Dave Berry and Dave Chappell explained today in their presentation about the SOA grid….So I guess I am just as bad as the rest of us ;-)

Read more...
Comments Off

openworld07 – “Just say NO to hub and spoke”

Lonneke Dikmans November 12th, 2007

This quote, “just say no to hub and spoke”, is from a presentation that Dave Chappell gave today at the Oracle Ace Director product briefing. He talked about his vision on SOA. Traditionally there is one way to ensure high available, scalable SOA: making all your services stateless. This way you can load balance them, cluster them, and fail over when something goes wrong. But this means you need a solution for your state. One way of handling that is carrying around your state in your messages. Another way of handling that is by having a separate entity manage your state, for example using BPEL or xpdl.
There is another solution possible: using a SOA grid. This enables state aware, continuously available services. This can be achieved by using coherence, the recently acquired product from Tangosol, as a cache. If you have a cache, you can get rid of your hub and spoke model that your process engine has become; the process engine can by anywhere it needs to be in the grid! Another interesting thought coming from this SOA grid is the concept of MOM in the middle: why send a message if the data is already there in the grid? You only need messaging solutions, when you have a true messaging use case. Not just to ensure reliable messaging or to do decoupling.
Dave Chappell has been publishing on this concept for a while now, and there are other companies that use the same terminology (see for example the Cordys website, or Tibco). It is a very interesting concept, but I am not sure everybody is talking about the same thing when they say ‘SOA Grid’. It will be like the ESB discussion, or the debate how to define a service…. it will keep us busy!

Read more...
Comments Off

BPEL has no goTo

Lonneke Dikmans October 30th, 2007

You might wonder why it is relevant. You could argue you have loops and switches to solve that. Let me illustrate it with two examples.

Example 1. BPMN in BPA Suite

When you use the BPA suite (10.1.3.3) to model your business processes in BPMN, you can transform the process to a BPEL process. This results in a BluePrint that can be opened in JDeveloper10.1.3.3 to add implementation details. One of the problems you run into, is the conceptual mismatch between the two modeling languages. BPMN is a graph oriented language (see this article where an example is shown) in which you are relatively free to move back and forth between steps. In contrast, BPEL is in its essence a block language, that follows a linear flow. When you represent a certain control flow in BPMN that involves moving back in the flow, you need to use another construct in BPEL to execute it, because BPEL has no goTo. You could argue that this is not a big deal, but in “On the Translation between BPMN and BPEL: Conceptual Mismatch between Process Modeling Languages”, Jan Recker and Jan Mendling explain why this is relevant. Apart from the semantical difficulties, you can run into practical obstacles. In the BPA Suite a certain transformation model is implemented to translate gateways into BPEL constructs. You can easily create a process that is valid BPMN, but that won’t translate to a BPEL process in the BPA suite. This can be a sign of either of the following problems:

  • BPEL is not the right implementation technique for the process you are modeling. Usually this is the case when you have a finite state machine where a lot of different state transitions are possible.
  • The process is not modeled correctly. Sometimes, generalizations are made on the wrong modeling level. For example, imagine a travel reservation process with a step ‘edit the reservation’. This step might return after each event. This can result in numerous loop backs. Instead, the process should move forward. For example, the first time you ‘edit the reservation’, you are completing the client data. After checking availability, you might change the flight date. Translating both of them into edit the reservation is a generalization that should be done in the implementation phase, not in the process design.

Example 2. BPEL as the Controller implementation in your MVC pattern

You run into the same thing when you are using BPEL for your navigation flow, as the controller implementation. This is possible in JBoss Seam, but also with Oracle BPEL and ADF Faces. There are several advantages when you use BPEL as a controller:

  • you can trace user steps (for support, e.g.) using the logging capabilities of BPEL
  • you can have long running sessions (go for lunch or home and resume your registration process for example) using the dehydration store
  • you can deploy a new flow separate from the running application

However, it has a couple of disadvantages:

  • page flows can have back buttons. This is not supported in BPEL. Of course you can ’simulate’ that by using loops or compensation handlers but this results in the same mismatch as there exists between BPMN and BPEL.
  • Performance hit. Every time somebody starts the webapplication, a BPEL process needs to be instantiated. This is a lot of overhead, that is not as scalable as a ‘regular’ web application.
  • you need to build a bridge between the web session and the process instance.

To conclude: whenever you catch yourself wishing BPEL had a goto, re-evaluate your process model and/or implementation choice, it is a sign something is wrong!

Localization of BPA models

Lonneke Dikmans October 20th, 2007

In our global economy it is very common to have multiple locations where software is developed. This might make it necessary to support multiple languages in your models.
In this blog I will show you how to use accomplish that. I will use English and Dutch with the Demo101 database as an example. I use Oracle BPA Suite 10.1.3.3 and the Demo101 database.

First, we need to add the language of our choice to the database:

  • Go to the administration module and select languages
  • Press “New”… if the language of your choice is not displayed in the list
  • Select the language you need from the list (Dutch in my case) and press “OK”
  • Click “Close”

Next relogin with the language you just created

  • Right click on the “Database101″ and click “log out”
  • Right click on the “Database101″ and select “log in”
  • Enter username and password and click “Next”
  • Select the language you just added (in my case “Dutch”)

Now you will see that all the groups and models are “untitled” because we did not add any attribute names in Dutch. You can do this by logging in with the Dutch language and start adding attribute names and descriptions. This is complicated however, because we don’t know what is supposed to be there.
You can also add language labels in a different language than you are logged in.

  • Relogin in the English language
  • Go to the Designer module and right click on “Database101″ (or the database you are using)
  • Click “Attributes”
  • Right Click “Main group (English)” and select “Insert Language”
  • Select the language you want to insert (in my case dutch)
  • Click “OK”

Now we can start adding the attributes in Dutch, next to the English labels. Now when you relogin in the dutch language, you will see that all the models have attribute names in the correct language.

Obviously this works best if you know what language you need to support and are fluent in these languages. If you need to translate a complete model in a different language, a script would probably work better.

J-Fall 2007 and session titles.

Lonneke Dikmans October 15th, 2007

On October 11th, J-Fall took place. Twice a year the dutch Java User Group (NL-JUG) organizes a conference. Sessions often have ‘real life’, or ‘in practice’ in the title. Often this is just a trick to attract people. The presentation that Martijn van Berkum (GX) gave about the Java content repository 2.0 was a pleasant exception. His session was titled: “Java Content Repository (JCR) 2.0 (aka JSR-283)”. He explained the specification very clearly, both the 1.0 and 2.0 version. Because GX uses it in their product WebManager he could share some real life experience with the audience. This, unfortunately, was not the case with “Real world usage of JBI”. Jos Dirksen knows a lot about JBI and Enterprise Integeration Patterns, but his presentation only had some code samples. That is not what I expect when the title says ‘Real world usage”. Project experience, examples of clients who used JBI and a specific product, is what I expect and want from a session like that.
The discussion “the Enterprise Architect confronts the Application Architect” also did not offer what the title promised, but this time I did not care. It was very nice to have a different format (discussion in this case). The subjects they talked about were very interesting and real. A session that delivered exactly what the title promised, was Duncan Mill’s presentation. The session was titled: “Controllers – The Next Generation”. He gave an overview (and did that very well, because he is an excellent speaker) of the different webframeworks and how these frameworks deal with the Controller in the Model-View-Controller pattern. If you are curious about PageFlow in ADF and how this compares with Spring Webflow and Seam, you can download the presentation in November from the NL-JUG site. Don’t forget to try the PageFlow stuff with JDeveloper 11 (technical preview). That is what I am going to do, too!