Good afternoon James,
Thank you for the response and analysis. I will see how this fits in
with our design.
Thank you again,
Dan
From: [email protected] [mailto:[email protected]] On Behalf Of
James Agnew
Sent: Monday, May 23, 2011 11:54 AM
To: Kamp, Daniel (GE Healthcare)
Cc: [email protected]
Subject: Re: [HAPI-devel] Generate Message generically in v 1.0.1
Hi Daniel,
Is the issue you are having related to the fact that you can't find
"getVersionPackageName(String)" in 1.0.1? If so, that method has moved
to the class "DefaultModelClassFactory" in 1.0, due to all of the source
generation code being moved out of the runtime library.
One alternate way you might consider is to replace your message factory
with an instance of DefaultModelClassFactory. This class has the same
functionality you describe, so might be useful to you.
Incidentally, for what it's worth, I will add that I examined storing
serialized message graphs in a database at one point just as you
describe. My own experience was that storing them in plain ER7 format
ended up being:
- Worse in that it was slightly slower than Java
serialization/deserialization
- Better in that stored messages were much more compact
- Better in that the database values were human readable
Cheers,
James
On Tue, May 17, 2011 at 11:24 AM, Kamp, Daniel (GE Healthcare)
<[email protected]> wrote:
Hello everyone,
We have a need to upgrade from version 0.6 to 1.0.1 as we need to have
the Message object graph Serializable (to store a Message in a db).
The problem we came across is that the way we built our Message object
graph in a generic fashion will not work with 1.x.
------------------------------------------------------------------------
----------------------------------
The way we do it now:
public Message createMessageGenerically(String version, String
messageType) throws Exception {
String className =
SourceGenerator.getVersionPackageName(version) + "message." +
messageType;
Class msgClass = Class.forName(className);
Return (Message) msgClass .newInstance();
}
The input parameter examples are:
Version = '2.3.1', '2.5', etc
messageType = 'ADT_A01', 'ACK', 'ADT_A39'
------------------------------------------------------------------------
--------------------
I am having difficulties finding examples of how this type of generic
message creation can be done using version 1.x and above. Any help would
be greatly appreciated.
Thank you,
Dan
------------------------------------------------------------------------
------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Hl7api-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hl7api-devel
------------------------------------------------------------------------------
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its
next-generation tools to help Windows* and Linux* C/C++ and Fortran
developers boost performance applications - including clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Hl7api-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hl7api-devel