Automated Generation of Adapters.

we have a Business tier. There are different types of the client c,c++,corba, java client , soap based etc. How can i provide a generic interface so that it works well for all types of the client. i..e. all the client use the same api model communicate to the business tier(ejb-tier).

Pls suggest some answer. I heard that this could be done using automatic generating the adapters for various type of clients. but i dont know how to generate the adapter automatic or i am doing a conceptual mistake ?

[514 byte] By [kanaiyaa] at [2007-11-26 21:42:48]
# 1

I assume you are working with legacy systems, given the fact that you have so many technologies, if you could change that then you could go SOAP, which is the most interoperable one from the ones you are using. I have never heard about such a tool, but I am not within this kind of bussiness for that long anyway, but I would guess that if you want to archieve that and if you end up, finding that there arent any tools that can do this for your, you might have to work with raw tcp, in order to find what type of connection is being used by the client, and then forward it to the correct listener, its not that difficult this way.

There are patterns that can easilly tell you which protocol is being used.

MeTitus

Me_Titusa at 2007-7-10 3:29:15 > top of Java-index,Other Topics,Patterns & OO Design...
# 2
Use the Business Delegate design pattern to provide an interface to the Business tier. All clients will use the same api model communicate to business tier(ejb-tier).
GhostRadioTwoa at 2007-7-10 3:29:15 > top of Java-index,Other Topics,Patterns & OO Design...
# 3

> we have a Business tier. There are different types

> of the client c,c++,corba, java client , soap based

> etc. How can i provide a generic interface so that

> it works well for all types of the client. i..e. all

> the client use the same api model communicate to the

> business tier(ejb-tier).

From experience I doubt that is possible.

Say you have two sources to get only customers from. One has a two line customer address and the other has a single line customer address. All other fields are the same and there are no duplicate customers between them.

That is something that you can create a general API for.

However that is a trivial example that is really unlikely to exist.

What is more likely is that one source has the customer. The other has the customer orders. The second has a 'customer' but it is a vastly minimal version of the first. And worse the second 'customer' although there is supposed to be a one to one mapping via an 'account number' the real data reveals that the manually entered 'account number' doesn't match up for all cases.

So only after you do a data clean up, can you then implement one API for the customers and a completely different API for the orders.

jschella at 2007-7-10 3:29:15 > top of Java-index,Other Topics,Patterns & OO Design...
# 4
WonderFul ! This is what i guess. Thank you.
kanaiyaa at 2007-7-10 3:29:15 > top of Java-index,Other Topics,Patterns & OO Design...
# 5
can anybody let me know how to generate wrappers/ adapters automatically?
kanaiyaa at 2007-7-10 3:29:15 > top of Java-index,Other Topics,Patterns & OO Design...
# 6
> can anybody let me know how to generate wrappers/> adapters automatically?Xdoclet lets you generate code.Myself I just usually write my own generators.
jschella at 2007-7-10 3:29:15 > top of Java-index,Other Topics,Patterns & OO Design...