I think that anyone who read my previous posts can see that I work allot with ESBs – the blog posts were mostly dedicated to IBM, but I work with OSB, JBossESB and some other solutions as well.
A customer of mine asked me to build a POC of using WS-RM with CXF, C# and Oracle Service Bus. Against my better judgement – I said yes. I know it doesn’t work – but I’m always up to the challenge.
A customer of mine has decided to build an application that can monitor his processes, instead of the regular WPS supplied tool.
Well, I haven’t blogged in ages, and it’s not because I lacked things to share…
- Download AspectJ 1.6.2.
- Since it’s been a long time since I worked with AspectJ, I wrote a small program in Eclipse. I just made sure that it used the WPS JDK – to make sure the -javaagent flag works. It does. However, you can’t use it when your eclipse works with a Sun JDK. So – add a -vm to your eclipse.ini file. (See here for details: http://wiki.eclipse.org/Eclipse.ini
- Now, I opened a new WID module, wrote a short process.
- I also created a small Java Project, which will create a JAR in the WAS/lib directory. It will include my aspects and the aop.xml file (under the META-INF directory)
- I started my WPS server, and put the -javaagent flag in the startup options. WAIT!!! Since WPS security is enabled by default, and the aspectJ weaver is located outside the WPS libraries – java security policy won’t let it load – and you can’t start your server!!! Copy the jars into the WPS lib directory. Just make sure you don’t override existing files (aspectj.jar should be in WPS/lib – just rename it to something that doesn’t end with JAR)
- That should be it – the aspects now work. However, how do we tie them to the process itself?
- It seems that the way WPS works is that for every BPEL activity there is a class in the com.ibm.bpe.engine package, and the doActivate method is called. So our pointcut will need to look like this – @Before(“call(void com.ibm.bpe.engine.BpelActivityKind*.*(..))”) – this should also explain why we put the aspect in the JAR in the WAS/lib directory – it should be in the correct class-loader level.
- Well the only thing missing is the actual pointcut – but it’s too late for that – will publish it tomorrow morning… Don’t hold it against me. I will also post the required code to get which Activity we are on. Quite cool…
My next post will probably be a book review – I was asked to review a new book on WAS 7.0 administration. Cool. Hopefully I’ll be able to read it in the next couple of days (did I ever mention I was a quick reader?)
- SCA Java components are actual EJBs, so why have an EJB call an EJB? Not a smart move, performance wise.
- Mediation Module (6.1) EJB support is lousy. It fails generating good mapping between the Java bean parameters and Data objects. So my customer resorted into sending Strings to the EJBs, and then parsing them, at the EJB level, to POJOs, using XMLBeans. This is insane – and shouldn’t be done.
I faced many problems while installing WID 6.2 on my Windows 7 machine. I won’t get into the full set of problems I encountered, but the process that did work for me was as follows:
Well, a customer of mine has a very weird bug. Sometimes he gets a StaleConnection exception when executing a statement against his Oracle Connection. The client runs WebSphere App Server 6.1, Oracle Database 10g, and uses EJBs and an XA datasource.
Well, turns out I was mistaken in my previous post. Invalid Content Length can occur when using MTOM in .net C# clients with WebSphere ESB, but that was not the case in our customer.