Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

java based messaging system problem

Status
Not open for further replies.

eizofitz

Programmer
Dec 9, 2002
9
GB
hello,
I am currently working on a java-based purchase and sales messaging system. The system currently offers real time message delivery, providing a secure environment for electronic trading --- i.e. it basically allows us to offer a fast, paperless, efficient and error free service to IFAs, stockbrokers and other Intermediaries.
However, it is necessary for me to make some new ehancements to the system and I have not been programming for long in java.
One of the new validation requirements is as follows:
When a user populates one of the message fields, (for example product id.), I must compare the value he/she entered to a list of product id's we already have stored in a Sybase table. If the value does not match one of these id's we have stored in Sybase, then the message will be sent back to the user with an error.

How should I go about coding this validation?
 
Is the system a thin-client one (browser front end, jsp/servlets on the back), or a stand-alone java application using Swing? "When you have eliminated the impossible, whatever remains, however
improbable, must be the truth." ~ Arthur Conan Doyle
 
A message Hub is the core of the system and it manages the routing and authentication of all messages. It ensures that messages are from authorised sources and that they are delivered securely to authorised destinations.
Connection to the Hub is via a secure FIX connection over the Internet. This allows users to connect back-office systems directly to the Hub, thereby enabling straight-through processing. FYI, the Financial Information Exchange (FIX) protocol is a message standard developed to facilitate the electronic exchange of information related to securities transactions. In networking terms, it belongs in the application layer that sits above the transport layer: it is independent of transport protocols such as TCP/IP or X.25 but is compatible with them. Because my system is an Internet-based solution, it uses FIX over TCP/IP.

To achieve this straight through processing we makes use of an architecture that is based on the Common Object Request Broker Architecture (CORBA) technology. This is an open industry standard for distributed object communication.

Users can access our system by the Web or by FIX or both. If they choose both, they may raise the same message type (e.g. orders) by Web or FIX – those raised by Web will have responses delivered by Web, those raised by FIX will have responses delivered by FIX.

Just to give an idea of how it works, the system's messaging model is as follows: an Intermediary sends a ‘request’ message to us and we supplies one or more ‘responses’. For example, an order request may be sent to us and we would then book & price the deal and send these back as responses for that order to the client.
A request message is made up of a number of different message fields, all of which contain data that's necessary for us to complete a deal. (ie. product id and so on)

What I'm trying to do is ensure that the value entered into one of these fields (for example, product id), is a valid product id. In other words, I want to add some validation that will compare the value entered in that message field by the client to a list of valid value's (i.e. product id's) that we have in sybase. How do I do this in Java?



 
A message Hub is the core of the system and it manages the routing and authentication of all messages. Connection to the Hub is via a secure FIX (Financial Information Exchange)protocol connection over the Internet. This allows users to connect back-office systems directly to the Hub, thereby enabling straight-through processing. Because my system is an Internet-based solution, it uses FIX over TCP/IP.
To achieve this straight through processing we makes use of an architecture that is based on the Common Object Request Broker Architecture (CORBA) technology. This is an open industry standard for distributed object communication.
Users can access our system by the Web or by FIX or both. If they choose both, they may raise the same message type (e.g. orders) by Web or FIX – those raised by Web will have responses delivered by Web, those raised by FIX will have responses delivered by FIX. Just to give an idea of how it works, the system's messaging model is as follows: an Intermediary sends a ‘request’ message to us and we supplies one or more ‘responses’. For example, an order request may be sent to us and we would then book & price the deal and send these back as responses for that order to the client.A request message is made up of a number of different message fields, all of which contain data that's necessary for us to complete a deal. (ie. product id etc..)

What I'm trying to do is ensure that the value entered into one of these fields (for example, product id), is a valid product id. In other words, I want to add some validation that will compare the value entered in that message field by the client to a list of valid value's (i.e. product id's) that we have in sybase. How do I do this in Java?
 
>> How should I go about coding this validation?

Well i don't know the architecture/design, but without taking the time to study it I can say this. At some point you need to use JDBC to query the table for the “ID” you mentioned. If you get back a row it exists, if not it doesn’t. Now if you don’t know SQL and your database “Sybase”, go to the DB forum for that database here at Tek-Tips and ask for help with SQL statements.

-pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top