Tuesday, November 30, 2010

Instructions to install, configure and run XMing on putty

first of all, make sure there connectivity from your server to your laptop:
log into your server and ping your laptop!


download:
http://sourceforge.net/projects/xming/

execute Xming-6-9-0-31-setup.exe

full installation (choose all defaults)

launch XMing

allow access to all networks

you should see an icon of the XMing XServer 3.0 service in the bottom right


open file X0.hosts in the XMing installation folder and add the IP of your target server (example 11.36.32.93)

restart XMing

create a putty connection and tick "Connection/SSH/X11/Enable X11 Forwarding"
login to your server (example 11.36.32.93)

export DISPLAY=11.192.1.41:0
(10.192.1.41 is your IP, you can find it with ipconfig and look at LAN IP)

to test, run "xclock" in putty

in case of problems, right-click on the XMing icon and "view log"


This error:

Xlib: connection to "11.192.1.41:0.0" refused by server
Xlib: No protocol specified

means that you haven't added the server's IP in X0.hosts

SOA suite, BPEL variables: message type, simple type, element

In a BPEL file you have a variables section, and each entry can be declared as messageType, type or element.


A variable of type "messageType" has its type declared in the "message" clause of a WSDL.


   
   

   
    
        
    


A variable of type "type" is a simple xsd type:

variable name="Counter" type="xsd:integer"

A variable of type "element" is a complex xsd type defined as element:

variable name="Books" element="ns2:BookCollection"

where BookColletion is



      
         
      
   



When interacting with Partner Links, you can only use variables of type messageType; if your data is stored in a variable of type element, you should copy it using a Assign block.

Monday, November 29, 2010

Customization File for SOA Suite

When you specify an input/output directory for your File Adapter, use "Logical Name" rather than "Physical Path" (Directory Names are specified as....).
Let's assume I specify FILES_DIR_OUT.

This will create an entry in the composite.xml



and at the beginning it's an empty string.

You should specify a token (like ${FILES_DIR_OUT}) and during your deployment process replace that token with the actual value - use any filtering mechanism like Maven Filter of a simple "sed" script....

I don't think there is a built-in support in the Ant build and deploy scripts to do that.


See also the File Adapter documentation:
http://download.oracle.com/docs/cd/E15523_01/integration.1111/e10231/adptr_file.htm#CIAHFFBI


OSB vs SOA Suite

guest post - thanks to Fabio.

SOA Suite and OSB are overlapping products, and also complementary.

Last year was it when starting another project, I did a POC to consider whether we should use SOA Suite or OSB. The project needed a bus service, so this was the only point analyzed.

A summary:

1) For long duration processes sure I would use BPEL, not OSB.

2) I have looked at using only the Mediator (the former Oracle ESB). However, I could not do what I wanted, such as exception handling and auditing. So I started to analyze BPEL

3) BPEL: the development environment in JDeveloper BPEL is much better than the OSB. Simple things like setting variables, and validate XPaths, which doesn't exist in OSB, JDeveloper SOA Suite has plugins that work very well.
However, you have to compare the performance of the OSB with the performance of BPEL. In my POC OSB was at least 15 times faster than BPEL. In my performance test, OSB reached 300 tps while BPEL is not going to 20tps. At the time I opened a call with Oracle, I disabled dehydration, and changed other settings to improve performance.

The consultants at Oracle told me I could not greatly improve the performance of the BPEL, because it was not designed to be a bus service. And this is why Oracle has chosen the OSB Service Bus strategy.

The runtime of the OSB is much more optimized than the BPEL runtime. The monitoring of OSB is also much more advanced, with real-time monitoring, SLA, alerts, etc..
When Oracle improve the plugin for OSB for something like BPEL (can be Eclipse or JDeveloper, no matter the tool), oh yes the product will be much better.



Here a great presentation on what you can accomplish with OSB and with SOA Suite, and overlapping functionalities. Especially worthy is the slide at page 13.

Of the same author, I would also recommend this presentation on testing SOA Suite environments.

Sunday, November 28, 2010

SOA Suite and OSB: deploying and testing

You should create a SAR file and deploy it.

SOA SUITE:

with WLST:

some interesting WLST commands here

Here C:\Oracle1\Middleware\Oracle_SOA1\bin\ant-t2p-worklist.xml the MDS migration tool.

with ANT:
C:\Oracle1\Middleware\jdeveloper\bin\ant-sca-compile.xml

here the entire documentation on how to build and deploy using the Ant files.

OSB:

with WLST:
http://www.oracle.com/technology/sample_code/products/osb/index.html

also here another version of same script
http://www.insemble.com/oracleservicebus-deployment.html

before you run it:

c:\Oracle1\Middleware\wlserver_10.3\server\bin\setWLSEnv.cmd

set CLASSPATH=%CLASSPATH%;C:\Oracle1\Middleware\Oracle_OSB1\lib\sb-kernel-api.jar;C:\Oracle1\Middleware\Oracle_OSB1\modules\com.bea.common.configfwk_1.3.0.0.jar;C:\Oracle1\Middleware\Oracle_OSB1\lib\sb-kernel-impl.jar

java weblogic.WLST import.py import.properties

Examples:

how to compile your SCA with Ant:

cd C:\JDeveloper\mywork\myproject
ant -f C:\Oracle1\Middleware\jdeveloper\bin\ant-sca-compile.xml -Dscac.input=C:\JDeveloper\mywork\myproject\composite.xml

this will produce out.err and out.xml in your default TEMP directory
(eg C:\Users\pierre\AppData\Local\Temp)

then package into a jar file:
ant -f C:\Oracle1\Middleware\jdeveloper\bin\ant-sca-package.xml -DcompositeDir=C:\JDeveloper\mywork\myproject -DcompositeName=myproject -Drevision
=1.0

then deploy:

ant -f C:\Oracle1\Middleware\jdeveloper\bin\ant-sca-deploy.xml -DserverURL=http://localhost:7001 -DsarLocation=C:\JDeveloper\mywork\myproject\deploy\sca_myproject_rev1.0.jar -Duser=weblogic

Getting started with SVN on Windows 7

the quick an dirty way.

Download SVN from here

Install it to C:\csvn

open a CMD window
cd C:\csvn\bin
svnserve.exe -d


To IMPORT code INTO SVN:
open a CMD above the source folder you want to import
cd C:\acme\svnsource

c:\csvn\bin\svn import osb file:///C:/acme/svnrepo -m "Creation of my first project"

To CHECKOUT the code FROM SVN:

c:\csvn\bin\svn checkout osb file:///C:/acme/svnrepo osb

To provide username and password:
svn --username ${svnusername} --password ${svnpassword}

To display all projects with they last check-in info (revision, username, timestamp) use:
svn -verbose list url
example:
  12991 auser1              Oct 01 17:07 Project1/
  13636 auser2              Oct 09 13:32 Project2/
  10491 auser3              Aug 05 01:00 Project3/


To create a release notes (list of all comments for checkins since last version):
svn log url -v -r 2012-09-22:14-34 --xml

this will list all entries in a date range (from date to date)
svn log -r {2012-09-22:10-12}:{2012-09-23:10-12} That's all, folks!


Friday, November 26, 2010

Installing SOA Suite on Windows 7 64bit

Make sure you use a 64bit JDK, otherwise the installation will silently fail.

Running setup.exe with the option -jreLoc=path/to/64bitJDK might help detecting the errors.

TOAD on Windows 7: ORA-06413: Connection not open.

See http://forums.oracle.com/forums/thread.jspa?messageID=1943221

Just install TOAD in c:\Programs\TOAD  instead of the default directory (avoid any parenthesis or spaces in the folder) and IT WILL WORK! Ask no questions, just work.

It takes guts to create a folder with SPACES in its name, but it takes a real HERO to add PARENTHESIS to SPACES. Well done, Microsoft!

Wednesday, November 24, 2010

Mocking Web Services

SOAP UI contains a mock service generation utility.

Is it worth using it?


Luciano says:


I have used them, and for me they are complicated to maintain (we had some 20 SoapUI Mocks and it was a pain in the neck to update and deploy them to Win and UNIX).

Another problem with the mock SoapUI is linked to the fact that if you change the WSDL you realize the problem only at runtime. For us it was a problem because the WSDL would change weekly, maybe not your case.

Finally, on my advice, we've moved to "normal" Web Services deployed in a dedicated EAR. In doing so we obtained the following advantages:

- Easy to deploy (the deploy was carried out directly by Hudson, during the normal deploy the application)

- The business logic of the mock can be more sophisticated, since it's all in Java

- The mock were compiled during the normal build procedure of the project, so we could detectd problems in the WSDL at build time - rather than runtime.


The infrastructure that I had set up allowed to create a web service from a WSDL with a simple command Gradl, so the migration to "mock Java" was a matter of 3 hours work.

If you have a mock or two, with a WSDL that never changes and one environment and deploy a simple business logic, use SoapUI. Otherwise consider creating a dedicated web service.

Tuesday, November 23, 2010

XML Validation

When you define your Data Model, you better enforce as many restrictions as you can on your data.... too many times a request fails mysteriously because the input data fails to comply to business specifications, and the earlier you catch this - the better.

Here are the validations available in the XSD
http://www.w3schools.com/schema/schema_facets.asp


For more complex validation (like: is element E1 value is A, then element E2 can only be X or Z), you should use Schematron:

Here some links to Schematron

http://www.dpawson.co.uk/schematron/index.html
http://www.xfront.com/schematron/index.html
http://www.codeproject.com/KB/XML/schematron_started.aspx
http://www.docstoc.com/docs/2134799/Schematron-Editor-Tutorial

I am not aware of how much Schematron is supported in a Oracle "SOA Suite" project.... I shall investigate...

Monday, November 22, 2010

Getting Started with Oracle BPM Suite 11gR1 – A Hands-On Tutorial


https://www.packtpub.com/getting-started-with-oracle-bpm-suite-11gr1-hands-on-tutorial/book


The book starts with an historical overview of the BPMN and BPEL standards.
It dedicates a full chapter to installation - which is particularly nasty for this product.
It covers DBAdapter, Mediator, BPEL Process Editor, Human Workflow, Business (Jess) Rules , BAM, OWSM, Fault Management Policy

to be continued.....

Saturday, November 20, 2010

Querying logs

Manually grepping logs is the single most wasteful and boring activity.

I had a look at http://www.logmx.com/ (nice videos showing main features).
Nice tool.

Yet I feel that having a Log File Query Language (LFQL? Sounds cacophonous..) similar to SQL would be much better.

I am sure I have seen something like that, if only I could remember where...

Wednesday, November 17, 2010

Simplify Complexity

a very interesting presentation on why we end up with overly complex architectures:

http://www.infoq.com/presentations/Simplicity-Architect

I don't agree with many technical statements (such as "HTTP is good! Transfer Objects are bad!") but the overall point is nicely presented. Plenty of interesting IT aphorisms and quotations.

Monday, November 15, 2010

VMware Fedora image doesn't connect to USB controller

VMware USB Arbitration Service service fails to start on Windows 7 with an error:

Detected unrecognized USB driver (\Driver\usbfilter).


The solution is here:

http://communities.vmware.com/thread/241662

"Try right clicking on one of the USB hubs and looking at the driver details. If usbfilter.sys is listed then open HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class{36FC9E60-C465-11CF-8056-444553540000} and delete the UpperFilter, usbfilter pair.
I rebooted and it works great now. "


I have wasted a couple of hours for this "trick".... it's working now....

still, I am downloading a ready-made fedora 14 vmware image from linuxtracker...

or rather, the version 13 from here http://www.thoughtpolice.co.uk/vmware/ since the 14 apparently doesn't support VMware Tools (?).

Saturday, November 6, 2010

SNMP consoles

Fabio suggests me:

http://www.manageengine.com/products/applications_manager/application-performance-management.html - It has a web interface. It can connect to weblogic using JMX and act as a SNMP Console as well to receive SNMP Traps.

http://www.castlerock.com/ (Pure SNMP. I would not use this in productions, but it's quite handy to test receiving the traps. You can set it up in 10 minutes)

Friday, November 5, 2010

Psychodrama

Often IT floors are chronically afflicted with psychological communication barriers;
e.g. a developer doesn't talk to a manager because he is afraid of him, or 2 developers don't talk to each other because they don't feel esteem for each other.

These communication broken paths are like ischemic scars in the neuronal network of your project. They lead to impaired functionality, slower response etc.

I wonder if anybody tried reenacting those small dramas and conflicts on a stage, to laugh them off and break barriers, using techniques like http://en.wikipedia.org/wiki/Psychodrama

I am not sure what this picture has to do, but I love it:



The Hourglass Syndrome

New project, and, needles to say, new under-equipped machine.

When you run WebLogic server and Oracle Workshop (forget about Oracle DB) on a single desktop, you need definitely MORE than 2 GB.

It seems to be a STANDARD for humongous, cash-rich corporation to equip their workers with machines as HALF as powerful what a private would get from a supermarket spending 500 euros. Nobody today would buy a desktop with less than 4 GB.


The result is this: you put to sleep the creative thinking.
When you are presented constantly with an hourglass whenever you click something, it really HURTS you. It's a stress syndrome. It's a frustration syndrome (someone calls it "post traumatic wait syndrome").









You stop generating new ideas because you know that putting them in practice would put you through a lot more pain that the idea itself would bring you. If you punish with an hourglass (or an electric shock) every innovative idea, you kill innovation.

This is what corporations achieve by saving 40 Euros on a 2 GB chip of RAM.

My advice: don't expect corporations to care. Just buy a 2 GB RAM, install it and file an expenses claim.

The devastating power of rumours

In a previous life, during the performance tests of an environment, we would inject load with LoadRunner, targeting a WebLogic cluster through an Apache with WebLogic Proxy Plugin as Load Balancer.
The load generation scripts had been prepared by a LoadRunner consultant (very messy guy) who had just left the company. Funnily, this guy enjoyed good reputation, because he would prepare very good looking documents, but he was a really messy coder, copying and pasting like hell.

We would constantly measure more load on one WL instance than the other.
I asked "are we sure we target only the Apache and not the managed servers?" and they answered "absolutely".
Some guys in the corridor started spreading the rumor that WebLogic Proxy Plug-in is a poorly tested product, that it often does a poor job at balancing properly the load, and that nobody really uses it in production.
These rumors much later proved to be ABSOLUTELY FALSE, WebLogic Proxy Plugin is a ROCK SOLID product, but at the time they were enough to make everybody point the fingers against the Proxy Plugin. We spent one week with Oracle support (very patient people, I love them) trying to troubleshoot the problem, in vain.

Finally, when all hopes were lost, one chap had the brilliant idea to carefully verify the LoadRunner scripts...only to discover that they were actually often targeting one of the Managed Servers! We felt like IDIOTS in front of the Oracle Support people and our managers.

Everyone can draw his conclusion. Mine is that now I am very tough with people who spread rumors without bringing evidence. If you are not 100% sure of what you are saying, please, shut your mouth, because the consequences of your comments can be really devastating and bring about pain and losses to the company and the people around you.

Thursday, November 4, 2010

Poll Result on Global Warming and Oil Spill

Time to close the poll... thanks to all of you who have voted, you are great folks.


I am quite skeptical about the result, once upon a time very few people had voted "global warming in a myth", it has made a remarkable comeback.... mmmmm.... anyway I am in London on the 4th of November and we have 13-16 degrees, as it was in mid-September....

Wednesday, November 3, 2010

Agile is as old as the mountains

I have read with pleasure this article on the lives of illustrious programmers.

Also available here

I found this sentence particularly intriguing:

Most of these programmers had (and have) a programming methodology that today would be called Agile. They mostly created a prototype that worked, and kept adding functionality until it was ready to ship. They worked iteratively in small teams. And, as Bricklin's current thoughts indicate, these developers were always cognizant that at some point you have to quit adding to the software and send it out the door. I found myself wondering how many readers imagine that "Agile" is something new.

Agile Methodologists try to teach us what - when left alone to self-organize our work - we have been doing for ages, out of "professional instinct" - that is the shortest path to success.

Agile, old as the mountains.

 I have listened also this presentation, very critical and well formulated. Still, I keep thinking that all these Agile practitioners are extremely verbose and religious.

Jean Tabaka and "I don't like Mondays". It was quoted by this article on Neuroscience.

This is one of the books recommended.
And this.

Monday, November 1, 2010

A Pattern Language

Amazon link



I highly recommend this book, full of original insights on Urban Planning, Anthropology and Mass Psychology.

On a general level, this article is a general presentation on the "pattern language" topic.