Monday, 30 November 2009

BPEL Partnerlinks thoughts

Today I have a support session with a colleague. One of the questions he came up with was about BPEL-partnerlinks. In his current project they have BPEL Partnerlinks to integrate with Pl/Sql procedures on E-Business Suite. They tend to introduce a partnerlink for every invoke of a Pl/Sql procedure. So how about reuse of partnerlinks?

Well at first thought the answer is simple: there is no one-to-one relationship between a partnerlink and invokes of that partnerlink. So you can introduce as many invokes on a certain partnerlink as you want.
However at second thought there are a few considerations. I'll give a few that I came up with:
  • Invokes preferably are done in seperate scopes. That is: I prefer to do so. That provides the possibility to catch exceptions on that scope specifically. Variables are kept local as much as possible. Escpecially when the documents they hold can be large. At least you should think about the scope of variables. So if the invoke's input and output variabables are locally declared then they cannot be reused amongst invokes.
  • If the input and output variables of the invokes are local and thus not shared, you need to build them up from scratch. This can introduce extra assign steps that might be avoided when declare the variables in a larger spanning scope. Extra assign activities with copy steps cost time. A little perhaps, but still they do. Shared variables are stored to dehydration store over and over again.
  • A shared partnerlink has thus shared MCF (managed connection factory)-properties. And possibly other adapter-related properties. Normally you probably want that. So in most cases it is advisable to share partnerlinks escpecially on adapters. Then you have to configure them only once. However in some cases you might (for instance with queues) use other parameters. Maybe you have two EBS-instances and a process calling the same procedure but on seperate instances. Then you need to split them up of course.
  • Be aware of transactions. The database adapter normally uses connection-pooled datasources. Database sessions are shared amongst instances. You might expect (but I won't rely on it!) that if you share a database-adapter-partnerlink (invoke it multiple times) in a synchronous process, that every invoke would use the same database-session. So for instance your application context settings, package variables, etc. are shared. Although I would check on run-time, you can use that for performance purposes. In a synchronous process you may rely on the fact that this occurs in the same database-transaction. However, if you use different partnerlinks for in fact the same Pl/Sql procedure/function call, the chance is large that you get another database-session. BPEL might need to rely on XA-transaction mechanisms. I don't think this is functionally a big problem. But might cause issues on processes with high performance requirements.
  • Maintenance: having multple partnerlinks for the same database procedure or even the same purpose introduces extra maintenance cost and a higher risk. I would not expect that a BPEL-project would have multiple partnerlinks for the same purpose. So in a Change Request or Test-Issue I tend to solve/change the first partnerlink and forget about possible others. And why should I be different from fellow developers? A good developer is a lazy one...
    Input and Output variables are based on the message-definitions of the partnerlinks-wsdl's. So changing one partnerlink might change the message definitions. If you reuse your partnerlinks, changing them will effect all the related variables.
These are thoughts that crossed my mind in thinking it over. To be sure you need to check by testing. But I do think that in most cases you should declare a partnerlink for a certain purpose only once. In principle that's the best practice. And that will prevent a lot of possible issues. Only re-declare a partnerlink if you have good reasons for it.

Wednesday, 25 November 2009

Oracle AIA Links

At the moment I'm delivering the OPN Bootcamp on AIA. One of the questions from the group is on documentation. So I have taken the time (while the students are busy with the labs) to scan around OTN to findout some of the interesting links on AIA.



Hope you'll find it usefull as well.

Sunday, 22 November 2009

Back to OpenSuse 11.1

Last week I encountered some troubles with my OpenSuse 11.1 installation. Apparently something in wine and else got corrupt. I had some idea's what might have caused it, but was not sure. Although I found some entries comparable to the errors I had, I could not find a sufficient solution. Since OpenSuse 11.2 turned out to be released recently, I thought: "let's give that one a shot". Everything installed smoothly.

Of course I had to install the native NVidia driver again using the one click install. OpenSuse does not ship the propietry drivers, but does provide a simple install-solution.
The multi-media support (escpecially flash and mp3) for 11.2 is installed via this post.

However after some strubbling I came to the conclusion that VMware Server 2.0.x just won't work under 11.2. The rpm does install, but the vmware-config.pl hits several nasty compile-errors. Apperently the kernel is just too new for VMWare. I found some scripts to repair the install, based on the tar.gz-deployment. But they were mainly focussed on Ubuntu, doing some preparartions using the Ubuntu package-manager. So I re-installed 11.1.
First I tried to upgrade KDE to 4.3, but that did not work well. So the third time I just installed 11.1-vanilla.
A one-click-install for multimedia support voor 11.1 I found here (basically the same blog that posted the one-click-install for 11.2.

A lass: OpenSuse 11.2 worked really fine: my laptop ran like a sun (there is a great commercial on Wind-energy on Dutch television. With an older man that hosts city-trips for foreigners. He talks really Dutch English with litterly translated Dutch sayings on wind. My favorite: "I think You think they smell an hour in the wind"). But to me VMware is a real must.
Especially this week: I'll deliver an OPN Bootcamp on AIA in De Meern, the Netherlands, from tommorow (mentioned dates are wrong: it's this week). It's based on a VMware image with an SoaSuite+AIA installment for the labs. If you're interested: there still are some seats available.

Monday, 16 November 2009

VMware Server 2.0.2 on OpenSuse 11.1

Today during preparing the OPN Bootcamp on Oracle AIA Foundation Pack, I found out that VMware Server 2.0.2 is out. It has been released on october 26th.
So I downloaded the one for my system (OpenSuse 11.1 x86_64). As well as the windows variant for the bootcamp.

To upgrade an existing installed vmware server you can do (as root):
makker-laptop:/usr/bin # rpm -Uhv VMware-server-2.0.2-203138.x86_64.rpm


To query which VMware Server you have installed:
makker-laptop:/usr/bin # rpm -q VMware-server
VMware-server-2.0.2-203138


To install if you're not having VMware Server:
makker-laptop:/usr/bin # rpm -ihv VMware-server-2.0.2-203138.x86_64.rpm


Then after that you should run vmware-config.pl in /usr/bin folder as root.

In my case something went wrong in installing the vsock module. I did not see that in an earlier install. This is the message I got:
make: Entering directory `/tmp/vmware-config6/vsock-only'
make -C /lib/modules/2.6.27.37-0.1-default/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-2.6.27.37-0.1-obj/x86_64/default'                
make -C ../../../linux-2.6.27.37-0.1 O=/usr/src/linux-2.6.27.37-0.1-obj/x86_64/default/. modules
CC [M]  /tmp/vmware-config6/vsock-only/linux/af_vsock.o                                     
CC [M]  /tmp/vmware-config6/vsock-only/linux/driverLog.o                                    
CC [M]  /tmp/vmware-config6/vsock-only/linux/util.o                                         
CC [M]  /tmp/vmware-config6/vsock-only/linux/vsockAddr.o                                    
LD [M]  /tmp/vmware-config6/vsock-only/vsock.o                                              
Building modules, stage 2.                                                                  
MODPOST 1 modules                                                                           
WARNING: "VMCIDatagram_CreateHnd" [/tmp/vmware-config6/vsock-only/vsock.ko] undefined!        
WARNING: "VMCIDatagram_DestroyHnd" [/tmp/vmware-config6/vsock-only/vsock.ko] undefined!       
WARNING: "VMCI_GetContextID" [/tmp/vmware-config6/vsock-only/vsock.ko] undefined!             
WARNING: "VMCIDatagram_Send" [/tmp/vmware-config6/vsock-only/vsock.ko] undefined!             
CC      /tmp/vmware-config6/vsock-only/vsock.mod.o                                          
LD [M]  /tmp/vmware-config6/vsock-only/vsock.ko                                             
make[1]: Leaving directory `/usr/src/linux-2.6.27.37-0.1-obj/x86_64/default'                  
cp -f vsock.ko ./../vsock.o                                                                   
make: Leaving directory `/tmp/vmware-config6/vsock-only'                                      
Unable to make a vsock module that can be loaded in the running kernel:                       
insmod: error inserting '/tmp/vmware-config6/vsock.o': -1 Unknown symbol in module            
There is probably a slight difference in the kernel configuration between the                 
set of C header files you specified and your running kernel.  You may want to                 
rebuild a kernel based on that directory, or specify another directory.  


You might not need it since Vsock is an optional module that is used in communication between guests and hosts. But luckily I found a solution here. Mr. Swerdna states that there is a flaw in the vmware-config.pl, for which he provides a patch. He also explains how to enable USB support in guests. So thank you very much mr. Swerdna.

Wednesday, 11 November 2009

PartnerlinkType not found

Yesterday I was struggling in getting a dynamic partnerlink coupling to work in BPEL PM.
I would not say that I invented the principle of dynamic partnerlinks myself. But lets say that it was not my first time. And what I tried and checked, and double checked, I kept hitting the error:

Error while invoking bean "presentation manager": Cannot find partnerLinkType 2.
PartnerLinkType "{http://www.domain.nl/PROJECT/SUBPROJECT/PUB}PROJECT_PUB" is not found in WSDL at
"http://localhost:7777/orabpel/default/MyBpelProcess/1.0/_MyBpelProcess.wsdl".
Please make sure the partnerLinkType is defined in the WSDL.

ORABPEL-08016

Cannot find partnerLinkType 2.
PartnerLinkType "{http://www.domain.nl/PROJECT/SUBPROJECT/PUB}PROJECT_PUB" is not found in WSDL at
"http://localhost:7777/orabpel/default/MyBpelProcess/1.0/_MyBpelProcess.wsdl".
Please make sure the partnerLinkType is defined in the WSDL.
At the end I was so desperate that I thought: "Okay then, lets google the error". Afterwards I could hit myself with the question: "why didn't I do this earlier?". Because the answer was simple and can be found (amongst others) here: Just clear the WSDL cache. Apparently my wsdl updates were deployed but not replacing the occurence in the cache. Ouch.

To my defense I would say that dynamic partnerlinks aren't hard but a mistake is made easy and the dependencies are very sensitive. And also I had to copy an existing solution to adapt it to a new situation. And that is harder than build it yourself. But may be in the future I should consider Google as a closer friend...

EU Commitee against Sun-aqcuisition

As I, honestly, expected the EU Commitee is against the aqcquistition of Sun by Oracle. This can be read (in Dutch) here. Main issue is the position of the MySql database. Oracle wants to keep it, but it would make Oracle not only the biggest in commercial databases but also in OpenSource.
It does impose a significant delay in the acquisition. Oracle expresses that the issues of the European Commitee are based on a misunderstanding on the database and open source marketed.

I'm curious how they see that, because it is not expressed in the quoted article.
Also the American department of Justice made explicitly clear that it approved while they're convinced that MySql does not damage the competition in the database market.

I find it curious though that the acquisition of a commercial company by another commercial company is under investigation/restriction because of a non-commercial product. I understand that the MySql holding company is in fact commercial. But you and I and every one who wants to do it can get a fork of the MySql source and start our own database. Provided that we know C++ (I conveniently assume that MySql is written in C++) , what in my case is quite rusty, and understand the sources.

So I would ask that if Oracle promises that they embrace MySql lovely caring, what would be the issue here then? And EU could just put some preconditions on the take-over. And sanctions if in a later stage Oracle turns out to not meeting those.
But then: I'm not so political. And I'm in a struggle: I'm pretty proud that one of the major forces in these matters on European Level is a Dutch woman, but at the other hand I've a history with Oracle. And I think the take over would be a good one. Or at least an interesting one. For Sun, Oracle and the ICT market.

Yesterday I found that Oracle wants to keep Sun's Glassfish Appserver as a referential implementation of J2EE. I take it with for example the SOAP toolstack Metro. Which is nice, because then Oracle has three app-servers if I'm counting right:
  • OC4j (originally from Orion), still base of the J2EE parts of E-Business Suite, and probably for years to come.
  • Weblogic (originally from BEA)
  • Glassfish (originally from Sun)
I heard from a colleague who attended the DBA-day of the Dutch Oracle User Grouop that Oracle would not go further with VirtualBox. That would be a pity I think. I don't think it means that it ceases to exist. But a desktop virtualization tool would nicely extent Oracle's virtualization portfolio. Oracle might be focussing on the Server market. But then, what about StarOffice/OpenOffice for example?

Well questions enough. And a nice subject to philosophize further upon. But to remember/rephrase a phrase from Mike Oldfields "Songs of a distant earth": "Only time will tell"...