Deprecated: Assigning the return value of new by reference is deprecated in /home/pwsconsu/public_html/blog/inc/_main.inc.php on line 123

Deprecated: Assigning the return value of new by reference is deprecated in /home/pwsconsu/public_html/blog/inc/MODEL/generic/_genericelement.class.php on line 112

Deprecated: Assigning the return value of new by reference is deprecated in /home/pwsconsu/public_html/blog/inc/_blog_main.inc.php on line 306

Deprecated: Function ereg() is deprecated in /home/pwsconsu/public_html/blog/inc/_blog_main.inc.php on line 413

Deprecated: Assigning the return value of new by reference is deprecated in /home/pwsconsu/public_html/blog/plugins/code_highlight_plugin/_code_highlight.plugin.php on line 528
The South East Asia SOA Weblog - Category: SOA Solutions in South East Asia

Category: SOA Solutions in South East Asia

02/18/16

Permalink 13:19:04, by moonewzii1 Email , 27 words, 885 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

https://www.easyinsure.co.th/


Deprecated: Assigning the return value of new by reference is deprecated in /home/pwsconsu/public_html/blog/skins/_feedback.php on line 102

07/01/11

Permalink 04:25:16 pm, by david Email , 45 words, 9044 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


Deprecated: Assigning the return value of new by reference is deprecated in /home/pwsconsu/public_html/blog/skins/_feedback.php on line 102

06/07/11

Permalink 09:31:30 pm, by david Email , 428 words, 60916 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:

Code:

Properties props = new Properties();
      props.setProperty("java.naming.factory.initial",
      "org.openejb.client.LocalInitialContextFactory");
 
      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:

Code:

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");
  localFoo.bar();
} 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.


Deprecated: Assigning the return value of new by reference is deprecated in /home/pwsconsu/public_html/blog/skins/_feedback.php on line 102

05/21/11

Permalink 06:14:04 pm, by david Email , 96 words, 7600 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)pwsindonesia.com … obviously replace the (at) with an @ sign.


Deprecated: Assigning the return value of new by reference is deprecated in /home/pwsconsu/public_html/blog/skins/_feedback.php on line 102

03/25/11

Permalink 03:39:25 pm, by david Email , 320 words, 15387 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 dozer.properties, 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.


Deprecated: Assigning the return value of new by reference is deprecated in /home/pwsconsu/public_html/blog/skins/_feedback.php on line 102

:: 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.


Deprecated: Assigning the return value of new by reference is deprecated in /home/pwsconsu/public_html/blog/plugins/_calendar.plugin.php on line 135
October 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 31        

Search


Deprecated: Assigning the return value of new by reference is deprecated in /home/pwsconsu/public_html/blog/skins/_linkblog.php on line 46

XML Feeds

What is RSS?

Who's Online?

  • Guest Users: 24