project methodologies icon
continuous integration icon
continuous integration icon
development practices icon
project implementation continuous delivery continuous integration development practices
JV-ration logo

Attempt to map WCF to Java terms

April 9, 2014 | By Viktor Sadovnikov | 9 Comments

By writing this post I’m taking a huge risk of being rejected by both .NET and Java communities. This is an attempt to explain what WCF, which stands for¬†Windows Communication Foundation, is in Java terms.

Service ButtonWCF-to-Java mapping is not really trivial. I’m lacking understanding to what extend WFC consumer should be aware about the type of communication with the service: request/response or asynchronous messaging. I have difficulties imagining this is completely transparent for the consumer… unless WCF framework “removes” asynchronousity of messaging and takes care of waiting for a response message(s). If the latest happens, then there is actually no asynchronous messaging ;-)

As usual with Java (and I was truly missing it working with .NET), there are Specifications of technologies and there are various Implementations of these specifications. Although normally the applications are being tested with and therefore claim to support explicit Implementations of used Specifications, in theory the final selection of those is done during deployment or just before the application starts.

Whenever we talk about a service, we have the actual service and its consumers.

Let’s start with consumers. For sending asynchronous messages they’d better be written against JMS – Specification for Java Messaging System. Consumers of JMS just need to know logical name of the target queue or topic. For request/response communication consumers should be written against a plain Interface of service. This Interface is agnostic to the technologies used on the service side and in the transportation layer. To obtain an explicit implementation of the Interface at run-time the consumer uses an externally configurable Factory. This factory will use something like¬†JAX-WS for Web Services, JAX-RS for RESTful services, RMI for remote EJBs (Enterprise Java Beans) or plain object (POJO) for in-process services.

Are you still here? Then let’s move to the service side. If the service consumes messages, it can be implemented using JMS directly or as Message-Driven Bean (flavor of EJB). The last option provides you with all that transactivity and scalability from Application Server (something like IIS). If the service should provide responses (including failures), the golden rule is to let them implement a plain Interface – the one, which will be used by the service consumer. Then either by adding annotations to the Interface Implementation code or by using external configuration in Application Server your implementation becomes accessible as Web Service or Session EJB. Actually nowadays most of the Servers are capable of exposing Session EJBs as Web Services. If you use Proxy pattern, you also have a clean, unspoiled implementation of the Interface, which can be used by in-process consumers.

This is a very lengthy explanation. A shorter translation of “All cross-layer entities are WCF services” would be: “All entities are defined by their Interfaces and written against Interfaces of other entities. Implementations of the entities are Plain Old Java Objects (POJOs), possibly wrapped by EJB Proxies

  1. Visit Wikipedia for more UK Information
    July 26th, 2014 @ 12:26 am

    I like what you guys are usualoly up too. This sort
    of clever work and exposure! Keep up the very good works guys I’ve
    you guys to our blogroll.

  2. China Information On Wikipedia
    August 5th, 2014 @ 2:18 pm

    Someone necessarily lend a hand tto make critcally posts I woud state.
    That is the very first time I frequented your web page and thus far?
    I surprised with the research you mde to make this actual publish incredible.
    Great activity!

  3. Information about the Chinese on Wiki
    August 11th, 2014 @ 3:32 am

    Pretty nice post. I just stumbled ulon your weblog and wanted to mention tat I have
    really loved surfing around your weblog posts. In any case I’ll be subscribing on your rsss fwed and I hope you write
    again very soon!

  4. Visit Wikipedia for more China Information
    August 12th, 2014 @ 12:38 pm

    I always emaild this web site post page to all my friends, because if like to read it after that my contacts will too.

  5. Don
    August 18th, 2014 @ 7:32 pm

    Unquestionably believe that that you said. Your favorite reason appeared
    to be on the internet the simplest factor to keep in mind of.
    I say to you, I definitely get annoyed at the same time
    as folks think about worries that they plainly don’t understand about.
    You controlled to hit the nail upon the highest
    and also defined out the whole thing without having
    side effect , other folks could take a signal.

    Will probably be back to get more. Thanks

    Also visit my webpage … homes inspections (Don)

  6. Milford
    August 18th, 2014 @ 7:46 pm

    Hello there, I believe your web site could be having internet browser compatibility issues.
    Whenever I look at your blog in Safari, it looks fine however,
    if opening in I.E., it’s got some overlapping issues.
    I just wanted to give you a quick heads up! Besides
    that, wonderful website!

    Here is my webpage – home inspector (Milford)

  7. Charlene
    August 19th, 2014 @ 6:06 pm

    I feel this is among the so much important information for me.
    And i’m satisfied studying your article. However wanna statement on few normal things, The web
    site style is perfect, the articles is in point of fact nice : D.
    Just right activity, cheers

    Here is my website … inspect (Charlene)

  8. Rocco
    August 20th, 2014 @ 6:27 am

    My partner and I stumbled over here by a different page and thought
    I might as well check things out. I like what I see so now i am following you.
    Look forward to finding out about your web page repeatedly.

    my web blog :: property inspection (Rocco)

  9. irritable bowel Syndrome diet
    August 27th, 2014 @ 12:55 am

    Thanks for the auspicious writeup. It in fact was once a
    leisure account it. Look complicated to more added agreeable from you!

    By the way, how can we communicate?

    Also visit my web page – irritable bowel Syndrome diet

Leave a Reply

eight − = 2