Category: SOA Solutions in South East Asia


Permalink 13:19:04, by moonewzii1 Email , 27 words, 696 views   Thai (TH)
Categories: SOA Solutions in South East Asia

easyinsureboker the one car

Cheap car insurance is suitable for everyone. Free 24 hour online order buy clicking
No need to get busy, easyinsure.
Thank you bro


Permalink 04:25:16 pm, by david Email , 45 words, 8746 views   English (US)
Categories: SOA Solutions in South East Asia

EnterpriseDB PostgreSQL Administration 26th July 2011

Just a quick note… PWS are conducting PostgreSQL Administration training (official training) on 26th-28th July 2011. The course includes hands-on and is a preparation for the PostgreSQL Associate Certification exam (includes voucher etc.). The details and registration landing pad can be found here: PostgreSQL Administration


Permalink 09:31:30 pm, by david Email , 428 words, 60297 views   English (US)
Categories: SOA Solutions in South East Asia

How to Call Geronimo 2.2 Local EJB using JNDI

I had searched high and low for a solution to this. Seems like all the solution examples on Geronimo’s web site were using annotations and everything else I looked at seemed to draw a complete blank. Never being one to give up that easily I decided to hack my way through it. The first trick to be aware of is that like all the other services in Geronimo, the OpenEJB services are installed into the server by means of a resource adapter GBean. This doesn’t matter that much other than that you need to consider this when searching for a solution. So the first thing I did was set up an initial context in my EJB client code (the scenario is Session EJB calls another session EJB using local interface). The following code fragment shows how to set up the initial context call:


Properties props = new Properties();
      Context ic = new InitialContext(props);

Note that I use “org.openejb.client.LocalInitialContextFactory” as the JNDI context factory class.

The second interesting fact has to do with the way in which OpenEJB exposes JNDI resources. When an EJB is deployed with both local and remote interfaces in most containers the java:comp/env namespace is used to provide access to local interface EJB resources. In Geronimo 2.2 with OpenEJB this definitely does not work at all. What actually happens is that an additional EJB interface is exposed as a “Local” interface. For example if I had deployed an EJB with the following components:

1) FooSessionEJBLocal - local interface
2) FooSessionEJBRemote - remote interface
3) FooSessionEJBBean - the actual session bean

… then OpenEJB will expose FooSessionEJBBean (the remote bean) and another curiously named EJB FooSessionEJBBeanLocal (the local bean). Only the latter can be cast to the FooSessionEJBLocal interface so for example when performing a lookup your code should look like this:


try {
  Properties props = new Properties();
  props.setProperty("java.naming.factory.initial", "org.openejb.client.LocalInitialContextFactory");
  Context ic = new InitialContext(props);
  FooSessionEJBLocal localFoo =  ic.lookup("FooSessionEJBBeanLocal");;
} catch (Exception e){
  ... do whatever

Note that the lookup is for “FooSessionEJBBeanLocal” and not “FooSessionEJBLocal". Also note that if you try to bind the remote EJB (FooSessionEJBBean) you can do so but that transactional context of using local EJB will not be managed by JTA (this is important if your code is dependent on operations within the context of the current container transaction).

Truth be told I was amazed that nobody on any of the Geronimo mailing lists had figured this out or had posted a workable solution.


Permalink 06:14:04 pm, by david Email , 96 words, 7376 views   English (US)
Categories: SOA Solutions in South East Asia

FREE EnterpriseDB Training

Just thought I would drop you all a not on my blog to let you know that PWS is organizing a day of free EnterpriseDB/PostgreSQL training around 9th/10th June 2011 in JAKARTA INDONESIA. If you are interested in attending this training then please contact PWS with the following details:
1) Your Full Name
2) Your contact details (telephone and email)
3) Your company name
4) What you would like to get out of the training.

If you can’t decypher the contact details above then just email me directly david(at) … obviously replace the (at) with an @ sign.


Permalink 03:39:25 pm, by david Email , 320 words, 15254 views   English (US)
Categories: SOA Solutions in South East Asia

Getting Dozer Working in Geronimo 2.2.1

One would assume that this is a simple thing at the outset but… not quite so fast. This actually took me a couple of days of hard slogging and debugging. The bottom line is that the the time is worth it for getting a value object mapping framework in place for one of the major applications we are building but there is a moderate amount of pain getting it going.

The major issue I struck with Dozer 5.3.2 is that the documentation on installation and configuration is non-existent for application servers. It also seems there have been so0me challenges with the class loader that Dozer uses internally. This relies on Apache Commons Lang 2.5 (the ClassUtils package). Once I had all of the minor stuff sorted out (XML mapping… BTW I recommend that you build a java main() to test your mappings out, especially if you are mapping a deep and complex structure as we are. There are a number of the advertised features of Dozer that are not well documented and also at times just do not work as expected. So you will need to play around with the XML mapping file and learn all of the constructs (which also takes a little time). What I ended up doing was downloading the Dozer sources and modifying the class loader because it was having problems in Geronimo (probably due to Geronimo’s class loading scheme). Anyway… a simple Class.forName() instead of using the CLassUtils calls to create the DefaultCLassLoader in Dozer and the problems were more or less solved.

I also ended up bundling everything up into a single JAR so that the, dozerBeanMapping.xml and the required XSD schema was on the classpath of the application… BTW, prior to this I tried all sorts of things (building a Geronimo adapter, deploying to the repository, placing the Dozer JAR file in the /lib/endorsed etc… all to no avail.

:: Next Page >>

Hosted by:
hosted by PWS Consulting

The South East Asia SOA Weblog

The intention of this blog is to collect thoughts on the issues, paradigms, process, vendors, solutions, project and any other item related service oriented architecture in South East Asia.

June 2017
Sun Mon Tue Wed Thu Fri Sat
 << <   > >>
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30  


XML Feeds

What is RSS?

Who's Online?

  • Guest Users: 50