Broker patern implementation ideas.


EJB design: Broker patern implementation ideas.

  1. Broker patern implementation ideas. (1 messages)

    Hey so far I have "web service" application, pre web services. Bassically a custom written server app that accepts XML.

    This application receives XML data and calls a stored proc which inserts the data in the DB. The stored proc does some data processing and at some popint calls an extended store proc from the database which forwards a formated string to a broker application connected to a 3rd party. The broker application sends a request to the 3rd party and awaits a response from the 3rd party. When the broker application receives a response, it responds back to the extended store proc, which in turn returns the result to the calling stored proc, the data is processed again and finally a response is sent back to the original server application which in turn responds to the client.

    Note: All this is in realtime, there is no need to queue the data.

    So I was thinking how I could simplify this and make it plugable without having to write to much code or be able to add brokers as quickly as possible.

    Step 1 is to replace my server app and use a servlet, possibly consider web services.

    Step 2 replace the monolithic brokers. Possibly use of EJBs? Maybe just simple beans? Brokers should be clusterable. Unless for very specific situations where broker requires 100% up time connection to 3rd party. Or cases where broker requires specific hardwware like isdn modem, which is not installed on every "app" server.

    Any good ides or links to good patterns for this kind of case?


    Threaded Messages (1)

  2. response[ Go to top ]


    Looks to me that you can turn your brokers into J2EE JCA adapters. Take a look into JCA specification, probably that's what you're looking for.

    I am not sure whether there is a strict business requirement to use complex stored procedures in your application or not, but if there isn't, I would recommend to move in some of this logic to EJBs where possible.

    As soon as the brokers will be represented by JCA adapters and you are coming up with a framework that easily utilizes the use of JCA-style brokers, you'll get what you want.

    Hope that helps.