Best way to define mapping

Hi
I am evaluating Kodo in the prospect to migrate an existing application
which uses a different JDO implementation and I am currently wondering
what is the best way to define the mapping.
So far, we have only used __.jdo__ metadata file with default values and
some jdo extension. Then we delegate to the JDO implementation the task to
define the schema and create it in the relationnal database.
I am trying to reproduce the same process with KODO. But :
- I am encountering some problem with the kodo extension.(but they are
certainly some mistake from my part, I will introduce some at the end of
this email)
- I understand that kodo can use a mapping file.
Here are my very first questions
- Which method should I use. Only JDO extension, or mapping file.
- if I use the mapping file, is it possible to only specify info for
fields which are different than default behavior of kodo
- If I use the jdo extension only how can I :
specify the name of a table for a particular class?
specify the name of a join table?
Specify the name of a column for a particular java field?
Is there a way to configure the mapping tool to use a custom naming
convention for the whole project (for a particular package)?
I already made a small evaluation of kodo 7 month ago with version 3.1.0,
but with this version, there was a bug discussed in this forum which
forced me to use the mapping file. But I had to define the complete
mapping, which was a huge task especially when you have to repeat field
mapping for sub classes. My first tests with kodo 3.2.2 works with jdo
extension, but I still have some issues as you can see from my questions.
Thank you for your answer.
Nicolas GANDRIAU
Environment description
Kodo 3.2.2 evaluation
MySQL 4.1.4-gamma'-Max'
MySQL Connector/J 3.0.15-ga
JDK 1.4.2_05 de Sun
Linux Kernel 2.6.8 (Mandrake 10.1)
IDEA 4.5.2

Nicolas,
You need to define which mapping file using the kodo.jdbc.MappingFactory
extension. Note that with either format that the mapping information
must be complete (or you can have Kodo create them for you):
http://solarmetric.com/Software/Documentation/3.2.2/docs/ref_guide_conf_kodo.html#kodo.jdbc.MappingFactory
The metadata mapping factory is more verbose though all of your
information is in a single file. .mapping files are more consise but
need to be deployed in addition to your .jdo metadata.
Nicolas GANDRIAU wrote:
Hi
I am evaluating Kodo in the prospect to migrate an existing application
which uses a different JDO implementation and I am currently wondering
what is the best way to define the mapping.
So far, we have only used __.jdo__ metadata file with default values and
some jdo extension. Then we delegate to the JDO implementation the task to
define the schema and create it in the relationnal database.
I am trying to reproduce the same process with KODO. But :
- I am encountering some problem with the kodo extension.(but they are
certainly some mistake from my part, I will introduce some at the end of
this email)
- I understand that kodo can use a mapping file.
Here are my very first questions
- Which method should I use. Only JDO extension, or mapping file.
- if I use the mapping file, is it possible to only specify info for
fields which are different than default behavior of kodo
- If I use the jdo extension only how can I :
specify the name of a table for a particular class?
specify the name of a join table?
Specify the name of a column for a particular java field?
Is there a way to configure the mapping tool to use a custom naming
convention for the whole project (for a particular package)?
I already made a small evaluation of kodo 7 month ago with version 3.1.0,
but with this version, there was a bug discussed in this forum which
forced me to use the mapping file. But I had to define the complete
mapping, which was a huge task especially when you have to repeat field
mapping for sub classes. My first tests with kodo 3.2.2 works with jdo
extension, but I still have some issues as you can see from my questions.
Thank you for your answer.
Nicolas GANDRIAU
Environment description
Kodo 3.2.2 evaluation
MySQL 4.1.4-gamma'-Max'
MySQL Connector/J 3.0.15-ga
JDK 1.4.2_05 de Sun
Linux Kernel 2.6.8 (Mandrake 10.1)
IDEA 4.5.2
Steve Kim
[email protected]
SolarMetric Inc.
http://www.solarmetric.com

Similar Messages

  • Best Way to Define Employee Numbering For Different Countries

    HI all
    I am working on for a project which will be for Multiple countries.But Each country has different Instances.Now the questions is What could be the Best way to Define Employee numbering for all the Regions ? As for as My knowledge goes It would be Number prefixed by Country.Then How we can have Alpha numeric in employee Coding ? We need to have Fast Formula to Ahieve this task.If any body has come across this scenario please share your thoughts .Any thoughts are greatly Appreciated.
    Cheers
    Kumar cs

    If you have each country on a different instance and you want employees to retain their employee number on transfer between countries, I believe you have two options:
    i) Use manual numbering. One recent change to the system is that you can update the numbering profile from Auto to Manual and back to Auto again. So you could potentially leverage this manual workaround when a cross BG transfer happens.
    ii) Bespoke module to export all emp numbers into a 'central repository', e.g., flat file, that can be accessed by all instances, imported regularly and then referenced by your Fast Formula. You would also need processing to determine when a person is a transfer from another BG or a new hire; probably have to be some control field on flex. Basically, this is a requirement made difficult by the decision to host each legislation on a different instance; I would never recommend clients to go down this route but I guess it's too late in your case.
    If cross BG transfers are not common, e.g., less than 5 a week, I would recommend option 1.

  • What is the best way to define this missing variable?????

    I think I am almost there with this question, thanks for working with me on this: trying to make buttons go target cue points in video
    I get this error code:
    ReferenceError: Error #1065: Variable seek_btn is not defined.
    import fl.video.*;
    // Video component instance name
    var flvControl:FLVPlayback = display;
    var flvSource:String = "lou.flv";
    // Set video
    flvControl.source = flvSource;
    // Add seek functionality to the button
    function seekHandler(event:MouseEvent):void
       flvControl.seekToNavCuePoint("lou1")
    seek_btn.addEventListener(MouseEvent.CLICK, seekHandler);
    seek_btn1.cuePointName = new String();
    seek_btn1.cuePointName = "lou1";
    seek_btn1.addEventListener(MouseEvent.CLICK, onButtonPress);
    seek_btn2.cuePointName = new String();
    seek_btn2.cuePointName = "lou2";
    seek_btn2.addEventListener(MouseEvent.CLICK, onButtonPress);
    // onButtonPress function
    function onButtonPress(evt:MouseEvent):void {
         flvControl.seekToNavCuePoint(evt.target.cuePointName);

    Definitely.... you are trying to assign a listener to something that does not exist
    seek_btn.addEventListener(MouseEvent.CLICK, seekHandler);
    If you do not have a seek_btn, the best way to define the missing variable is to create the seek_btn object.  If you don't plan to, then rather than define it, get rid of any code that uses it.

  • What is the best way to define constants in SOA ?

    Hi,
    What is the best way to define constants in SOA/BPEL ?

    I want to define at composite level. I have several BPELs in my composite. I have lot of Status and some other codes I need to check/compare/assign in assign activity and xslt transformations
    Ii can use BPEL preferences , but they only applies to that particular BPEL. I want to define all my codes in one place at composite level.
    Thanks
    --Sreeny
    Edited by: sreeny on May 29, 2012 8:59 AM

  • What's the best way to define some values based on the URL?

    Let's say for example I want all my URLs for servlets to take the form:
    http://mysite.com/module/action?arguments
    What's the most scalable way to handle mapping the values in place of "module" and "action"? For example, I might have a "forum" module and have an action to "deleteThread", called like so:
    http://mysite.com/forum/deleteThread?id=321
    I know I can just parse it myself, but is there a better way to handle this via some settings in web.xml or similar? All my requests go through a Front Controller which needs to know which module and action have been requested so that it can run the appropriate action controller.
    Cheers,
    Chris

    At the risk of repeat-posting, I'll clarify. Say I create a file named routing.xml which defines some routes like this:
    <routing-config>
      <route>
        <name>Standard rule</name>
        <description>
          This route maps the first two parts in the path with the module and action
        </description>
        <url-pattern>/:module/:action.do</url-pattern>
      </route>
      <route>
        <name>Default Index</name>
        <description>
          Allows the module to be specified without the action for "Index" actions.
        </description>
        <url-pattern>/:module.do</url-pattern>
        <request-parameters>
          <parameter key="action" value="Index" />
        </request-parameters>
      </route>
      <route>
        <name>Homepage</name>
        <description>
          Loads the Home page
        </description>
        <url-pattern>/</url-pattern>
        <request-parameters>
          <parameter key="module" value="Home" />
          <parameter key="action" value="Index" />
        </request-parameters>
      </route>
    </routing-config>The bits like ":module" which be represented by the actual name of the module in the URL. Does anyone know if something like this already exists? :)
    I wrote this exact same thing in PHP5 just a few weeks ago but I really don't have the motivation to write it all over again in Java :P On a side-note, things like this usually come with helpers for turning unclean URIs into clean URIs.

  • Best way to send map directions to iPhone?

    What is the slickest way to send map directions prepared on the desktop to an iPhone, for use on the road?

    Just to the right of the Directions tab click the action icon (box with a right facing arrow) then click:  Send to (name) iPhone

  • What is the BEST WAY to define a circle in PDF?

    Hi All
    I have been making circles in PDF in two ways and they both seem a little "hinky". One is using 4 bezier curves to approximate the circle which works pretty well and the other for smaller circles has been to use a thick line with a round end cap and make it one unit long and filled with white. There has to be an easier and better way. Any direction would be appreciated especially a small ASCII file example of the "correct" circle drawing technique.
    Thanks
    Ray

    Hi
    Thank you for responding. I'm using that technique now which works well but
    I was hoping there was some magic formula or operator I had missed. Thanks
    again. I'll keep using the bezier technique.
    Ray

  • Best way to automatically map Java bean hierarchy to JavaFx property bean hierarchy

    We do not want JavaFx on the server side, so our DTO objects are plain Java beans.
    On the client side, we want to use the comfort of JavaFx bindings. As we're using Java 7, POJO bindings aren't possible yet.
    So we're looking for a way to automatically wrap the Java beans in JavaFx property beans.
    Possible approaches I've been looking into:
    - Code generation via JCodeModel
    - JavaBeanPropertyBuilder
    Ideally, we would want to have classes with structured JavaFx properties as a result, so that an ObjectProperty does not use the bean class, but always the respective JavaFx property bean class.
    This is so we don't need too many low-level bindings, but can rely on deep select bindings.
    This goes beyond the capabilities of JavaBeanPropertyBuilder as far as I understood it, so I'm left with fairly complex code generation using JCodeModel.
    Does anyone have some experience to share? Am I missing an option?

    Andipa wrote:
    As we're using Java 7, POJO bindings aren't possible yet.
    I'm sorry to reply without a good suggestion, but is there some type of POJO binding support in Java 8?
    This is what I currently use for POJO binding, but it doesn't sound very close to what you're asking for.  A lot of code still needs to be written by hand.  Also, I've only used it with relatively flat models so far.

  • Best way to create menus [was: Queston]

    What technique or is a template used to create the menu for this Adobe page? I have been studying web development (reading and tutorials) and the sections are always short on creating menus.  Mostly, covers creating buttons with behaviors in Fireworks and inserting them into Navigation Bars and Tables?  What are the best ways to create menus?
    [Subject line edited by moderator]

    Howdy,
    The best way is definately not the Fireworks way. Never has been.
    Take RJweb's advise and check out the PVII Menu Magic. I use that all the time and its very easy to customize with its well laid out CSS files. I havn't found anything easier to use and customize yet.
    Brad Lawryk
    Community Expert: Dreamweaver
    Usergroup Manager: Northern British Columbia Adobe Usersgroup

  • Opinion needed on best way to map multiple table joins (of the same table)

    Hi all
    I have a query of the format:
    select A.col1, B.col1,C.col1
    FROM
    MASTER_TABLE A, ATTRIBUTE_TABLE B, ATTRIBUTE_TABLE C
    WHERE
    A.key1 = B.key1 (+)
    AND
    A.key1 = C.key1(+)
    AND
    B.key2(+) = 100001
    AND
    C.key2(+) = 100002
    As you can see, I am joining the master table to the attribute table MANY times over, (over 30 attributes in my actual query) and I am struggling to find the best way to map this efficiently as the comparison for script vs. mapping is 1:10 in execution time.
    I would appreciate the opinion of experienced OWB users as to how they would tackle this in a mapping and to see if they use the same approach as I have done.
    Many thanks
    Adi

    SELECT external_reference, b.attribute_value AS req_date,
    c.attribute_value AS network, d.attribute_value AS spid,
    e.attribute_value AS username, f.attribute_value AS ctype,
    g.attribute_value AS airtimecredit, h.attribute_value AS simnum,
    i.attribute_value AS lrcredit, j.attribute_value AS airlimitbar,
    k.attribute_value AS simtype, l.attribute_value AS vt,
    m.attribute_value AS gt, n.attribute_value AS dt,
    o.attribute_value AS datanum, p.attribute_value AS srtype,
    q.attribute_value AS faxnum,
    R.ATTRIBUTE_VALUE AS FAXSRTYPE,
    s.attribute_value AS extno,
    t.attribute_value AS tb, u.attribute_value AS gb
    v.attribute_value AS mb, w.attribute_value AS stolenbar,
    x.attribute_value AS hcredit, y.attribute_value AS adminbar,
    z.attribute_value AS portdate
    FROM csi_item_instances a,
    csi_iea_values b,
    csi_iea_values c,
    csi_iea_values d,
    csi_iea_values e,
    csi_iea_values f,
    csi_iea_values g,
    csi_iea_values h,
    csi_iea_values i,
    csi_iea_values j,
    csi_iea_values k,
    csi_iea_values l,
    csi_iea_values m,
    csi_iea_values n,
    csi_iea_values o,
    csi_iea_values p,
    csi_iea_values q,
    CSI_IEA_VALUES R,
    csi_iea_values s,
    csi_iea_values t,
    csi_iea_values u,
    csi_iea_values v,
    csi_iea_values w,
    csi_iea_values x,
    csi_iea_values y,
    csi_iea_values z
    WHERE a.instance_id = b.instance_id(+)
    AND a.instance_id = c.instance_id(+)
    AND a.instance_id = d.instance_id(+)
    AND a.instance_id = e.instance_id(+)
    AND a.instance_id = f.instance_id(+)
    AND A.INSTANCE_ID = G.INSTANCE_ID(+)
    AND a.instance_id = h.instance_id(+)
    AND a.instance_id = i.instance_id(+)
    AND a.instance_id = j.instance_id(+)
    AND a.instance_id = k.instance_id(+)
    AND a.instance_id = l.instance_id(+)
    AND a.instance_id = m.instance_id(+)
    AND a.instance_id = n.instance_id(+)
    AND a.instance_id = o.instance_id(+)
    AND a.instance_id = p.instance_id(+)
    AND a.instance_id = q.instance_id(+)
    AND A.INSTANCE_ID = R.INSTANCE_ID(+)
    AND a.instance_id = s.instance_id(+)
    AND a.instance_id = t.instance_id(+)
    AND a.instance_id = u.instance_id(+)
    AND a.instance_id = v.instance_id(+)
    AND a.instance_id = w.instance_id(+)
    AND a.instance_id = x.instance_id(+)
    AND a.instance_id = y.instance_id(+)
    AND a.instance_id = z.instance_id(+)
    AND b.attribute_id(+) = 10000
    AND c.attribute_id(+) = 10214
    AND d.attribute_id(+) = 10132
    AND e.attribute_id(+) = 10148
    AND f.attribute_id(+) = 10019
    AND g.attribute_id(+) = 10010
    AND h.attribute_id(+) = 10129
    AND i.attribute_id(+) = 10198
    AND j.attribute_id(+) = 10009
    AND k.attribute_id(+) = 10267
    AND l.attribute_id(+) = 10171
    AND m.attribute_id(+) = 10184
    AND n.attribute_id(+) = 10060
    AND o.attribute_id(+) = 10027
    AND p.attribute_id(+) = 10049
    AND q.attribute_id(+) = 10066
    AND R.ATTRIBUTE_ID(+) = 10068
    AND s.attribute_id(+) = 10065
    AND t.attribute_id(+) = 10141
    AND u.attribute_id(+) = 10072
    AND v.attribute_id(+) = 10207
    AND w.attribute_id(+) = 10135
    AND x.attribute_id(+) = 10107
    AND y.attribute_id(+) = 10008
    AND z.attribute_id(+) = 10103
    AND external_reference ='07920490103'
    If I run this it takes less than a second in TOAD, when mapped in OWB it takes ages. 10:1 is a conservative estimate. In reality it takes 15-20 minutes. CSI_IEA_VALUES has 30 million rows CSI_ITEM_INSTANCES has 500,000 rows.
    Hope that helps. I would love to know how others would tackle this query.

  • Why my map dosent show the addresses completly? it just shows the name of the city or in the best way the name of expressway (no matter how much i zoom in)and it wont work in reminder or any other place. this happend after i update my iphone 4 to ios 5.

    why my map dosent show the addresses completly? it just shows the name of city or in the best way the name of exxpressway and it wont work in reminder or any other place. this happend after i update my iphone 4 to ios 5.

    I am having a really wierd issue as well that is probally related. I dont see 95% of the album artwork associated with my music. Also, it seems as if this has gotten worse since I started using that match feature

  • What is the best way to make google earth style maps using Creative cloud

    I work in News.  I am trying to come up with the best way to create a google style map for our news stories.  I want to create a map that I can highlight certain counties and pinpoint certain spots on the map.  For example cities and landmarks.  So far we have been using our weather graphics system to accomplish making maps, or we have used google earth to make maps too.  From what I understand there would be a lot of leg work in the process of making a project that has a map database with any possible info I would need to make a map.  I need to be able to output the graphic in a Quicktime movie format, or at least a JPEG.  This would help us put the map on air for broadcasts.  Any suggestions, thoughts, advice on where to begin?  Am I wasting time?  Should I stick to google maps/earth?
    -Newsie WBBJ

    Don't leave it as an LOP file. FM will overwrite the contents every time. You may still have a ".backup.fm" version of this that will have your original table.
    Also, the approach mentioned should be the very last step when publishing the book, not something that you're continuously updating.

  • Hello-i have an i-mac; on the bookmark bar it has sites like news,google maps,etc.  Can i add sites to that bar like craigslist or aol mail?  what is the best way to go to  frequent websites?

    what is the best way to mark a frequent website other than a bookmark?

    The Apple Support Communities are an international user to user technical support forum. As a man from Mexico, Spanish is my native tongue. I do not speak English very well, however, I do write in English with the aid of the Mac OS X spelling and grammar checks. I also live in a culture perhaps very very different from your own. When offering advice in the ASC, my comments are not meant to be anything more than helpful and certainly not to be taken as insults.
    If you click the book icon on the left end of the bookmarks bar you can manage all of your bookmarks. Bookmarks can be added individually to the bar (the shorter the name the more room for bookmarks) or you can create folders of bookmarks that can be accessed from the bookmarks bar.
    http://operating-systems.wonderhowto.com/how-to/use-safari-bookmarks-bar-326549/

  • Whats the best way to get a description for a code

    Hi,
    What is the best way to find description for a code, when both of them resides in different table.I have to do this like 3 times for different codes.The code and description lies in differnt table.
    Can i use select statement.. if yes, what operator should i use?
    Thanks

    Hi,
    to do a lookup you may either use the Key Lookup Operator (it makes it easier to define default return values if the lookup fails) or a Joiner (to probably outer join your lookup table).
    If you have many lookups you can do them in one joiner instead of having a key lookup operator for every one of them to reduce the total number of operators in your mapping.
    Regards,
    Carsten.

  • Best way for Java/C++/C# to share data in a cache?

    I have an order processing application which listens for Order objects to be inserted in a cache. If I want Java, C# and C++ apps to be able to submit orders to that cache, what's the best way to set up that Order object? Orders currently have many Enum member variables. What happens when a C# or C++ app needs to put an Order object in the cache? how would it set those java enums? Also, the java Enum classes have a lot of Java specific code in 'em for convenience. I imagine for cross platform simplicity it might have been best if the Order object were just an array of Strings or a Map of Strings to values but I have too much code depending on the Order object being how it is currently. Should I extract an Order Interface? What about the Enums? My java enums aren't simple {RED,GREEN,BLUE} type enums, they contain references to other Enums, etc. - see below...
    A portion of my Order class looks like:
    public class Order implements Cloneable, Comparable, java.io.Serializable {
      private static Logger logger = Logger.getLogger(Order.class);
      private boolean clearedFromOpenOrdersTable = false; 
      private boolean trading_opened = false;
      private static Random generator = new Random();
      private static int nextID = generator.nextInt(1000000); //just for testing
      private int quantity = 0;
      private int open = 0;
      private int executed = 0;
      private int last = 0;
      private int cancelPriority = 0;
      private Integer sendPriority = 0;
    //enums
      private OrderSide side = OrderSide.BUY;
      private OrderType orderType = OrderType.MARKET;
      private OrderTIF tif = OrderTIF.DAY;
      private OrderStatus orderStatus = OrderStatus.PENDING_NEW;
      private OrderExchange orderExchange = null;
      private OOType ooType = OOType.NOTOO;
      private OOLevel ooLevel = OOLevel.NONE;
      private Float limit = new Float(0);
      private Float stop = null;
      private float avgPx = 0.0f;
      private float lastPx = 0.0f;
      private String account = null;
      private String symbol = null;
      private long submitTimestamp;
      private long fillTime = 0;
      private long ackTime = 0;
      private Timestamp submitSqlTimestamp;
      public /*final*/ static NamedCache cache;
      private ArrayList<OrderStatusChangeListener> statusChangeListeners =
        new ArrayList<OrderStatusChangeListener>();
      transient private Format formatter = new SimpleDateFormat("hh:mm:ss a");
      public static void connectToCache() {
        cache = CacheFactory.getCache("orders");
      public void send() {
        this.submitTimestamp = System.currentTimeMillis() ;
        this.submitSqlTimestamp = new Timestamp(submitTimestamp);
        cache.put(this.ID, this);
      public void setCancelCount(int i) {
        cancelCount = i;
      public int getCancelCount() {
        return cancelCount;
      public static class CancelProcessor extends AbstractProcessor {
        public Object process(InvocableMap.Entry entry) {
          Order o = (Order)entry.getValue();
          if (o.cancelCount == 0) {
            o.cancelCount = 1;
          } else {
            logger.info("ignoring dup. cancel req on " + o.symbol + " id=" + o.ID);
          return o.cancelCount;
      public void cancel() {
          // cache.invoke(this.ID, new CancelProcessor() ); // must this be a 'new' one each time?
          Filter f = new EqualsFilter("getCancelCount", 0);
          UpdaterProcessor up = new UpdaterProcessor("setCancelCount",new Integer(1) );
          ConditionalProcessor cp = new ConditionalProcessor(f, up);
          cache.invoke(ID, cp);
      NumberIncrementor ni1 = new NumberIncrementor("CancelCount", 1, false);
      public void cancelAllowingMultipleCancelsOfThisOrder() {
        System.out.println("cancelAllowingMultipleCancelsOfThisOrder symbol=" + symbol + " id=" + ID);
        cache.invoke(this.getID(), ni1);
      public Timestamp getSubmitSqlTimestamp(){
        return submitSqlTimestamp;
      boolean isWorking( ) {
           // might need to write an extractor to get this from the cache atomically
           if (orderStatus != null &&
                (orderStatus == OrderStatus.NEW || orderStatus == OrderStatus.PARTIALLY_FILLED ||
                    // including PENDING_CANCEL breaks order totals from arcadirect
                    // because they send a pending cancel unlike foc
                    // os.getValue() == OrdStatus.PENDING_CANCEL ||
                    orderStatus == OrderStatus.PENDING_NEW ||
                    orderStatus == OrderStatus.PENDING_REPLACE)) {
              return true;
            } else {
              return false;
      public long getSubmitTimestamp(){
        return submitTimestamp;
      private void fireStatusChange( ) {
              for (OrderStatusChangeListener x:statusChangeListeners) {
                    try {
                         x.dispatchOrderStatusChange(this );
                    } catch (java.util.ConcurrentModificationException e) {
                         logger.error("** fireStatusChange: ConcurrentModificationException "+e.getMessage());
                         logger.error(e.getStackTrace());
                         e.printStackTrace();
      public Order() {
          ID = generateID();
          originalID = ID;
      public Object clone() {
          try {
            Order order = (Order)super.clone();
            order.setOriginalID(getID());
            order.setID(order.generateID());
            return order;
          } catch (CloneNotSupportedException e) {
          return null;
        class ReplaceProcessor extends AbstractProcessor {
          // this is executed on the node that owns the data,
          // no network access required
          public Object process(InvocableMap.Entry entry) {
            Order o = (Order)entry.getValue();
            int counter=0;
            float limit=0f;
            float stop=0f;
            int qty=o.quantity;
            boolean limitChanged=false, qtyChanged=false, stopChanged=false;
            for (Replace r:o.replaceList) {
              if (r.pending) {
                counter++;
                if (r.limit!=null) {limit=r.limit; limitChanged=true;}
                if (r.qty!=null) {qty=r.qty; qtyChanged=true;}
                if (r.stop!=null) {stop=r.stop; stopChanged=true;}
            if (limitChanged) o.limit=limit;
            if (qtyChanged) o.quantity=qty;
            if (stopChanged) o.stop=stop;
            if (limitChanged || qtyChanged || stopChanged)
            entry.setValue(o);
            return counter;
      public void applyPendingReplaces() {
         cache.invoke(this.ID, new ReplaceProcessor());
      private List <Replace>replaceList;
      public boolean isReplacePending() {
        if (replaceList==null) return false; 
        for (Replace r:replaceList) {
          if (r.pending==true) return true;
        return false;
      class ReplaceAddProcessor extends AbstractProcessor {
        // this is executed on the node that owns the data,
        // no network access required
        Replace r;
        public ReplaceAddProcessor(Replace r){
          this.r=r;
        public Object process(InvocableMap.Entry entry) {
          Order o = (Order)entry.getValue();
          if (o.replaceList==null) o.replaceList = new LinkedList();
          o.replaceList.add(r);
          return replaceList.size();
      public void replaceOrder(Replace r) {
          //  Order.cache.invoke(this.ID, new ReplaceAddProcessor(r));
          Order o = (Order)Order.cache.get(this.ID);
          if (o.replaceList==null) o.replaceList = new LinkedList();
          o.replaceList.add(r);
          Order.cache.put(this.ID, o);
      public boolean isCancelRequestedOrIsCanceled() {
        // change to cancelrequested lock, not ack lock
        if (canceled) return true;
    //  ValueExtractor extractor = new ReflectionExtractor("getCancelCount");
    //  int cc = (Integer)cache.invoke( this.ID , extractor );
        Order o = (Order)cache.get(this.ID);
        int cc = o.getCancelCount();
        return cc > 0 || o.isCanceled();
        class Replace implements Serializable{
        boolean pending=true;
        public Float limit=null;
        public Float stop=null;
        public Integer qty=null;
        public Replace() {
      }and then a portion of my OrderExchange.java Enum looks like this:
    class SymbolPair implements java.io.Serializable {
      String symbol;
      String suffix;
      SymbolPair(String symbol, String suffix) {
        this.symbol = symbol;
        this.suffix = suffix;
      public boolean equals(Object o) {
        SymbolPair x = (SymbolPair)o;
        return (this.symbol == x.symbol && this.suffix == x.suffix);
      public int hashCode() {
        return (symbol + "." + suffix).hashCode();
      public String toString() {
        if (suffix == null)
          return symbol;
        return symbol + "." + suffix;
    public enum OrderExchange implements java.io.Serializable {
      SIM("S", false, '.', OrderTIF.DAY) {
        public String getStandardizedStockSymbol(String symbol, String suffix) {
          return symbol + "." + suffix;
        public SymbolPair getExchangeSpecificStockSymbol(String symbol) {
          return new SymbolPair(symbol, null);
      TSX("c", false, '.', OrderTIF.DAY) {
        public String getStandardizedStockSymbol(String symbol, String suffix) {
          String x = externalSymbolPairToInternalSymbolMap_GS.get(new SymbolPair(symbol, suffix));
          return x == null ? symbol : x;
        public SymbolPair getExchangeSpecificStockSymbol(String symbol) {
          SymbolPair sa = internalSymbolToExternalSymbolPairMap_GS.get(symbol);
          return sa == null ? new SymbolPair(symbol, null) : sa;
      NYSE("N", false, '.', OrderTIF.DAY) {
        public String getStandardizedStockSymbol(String symbol, String suffix) {
          String x = externalSymbolPairToInternalSymbolMap_GS.get(new SymbolPair(symbol, suffix));
          return x == null ? symbol : x;
        public SymbolPair getExchangeSpecificStockSymbol(String symbol) {
          SymbolPair sa = internalSymbolToExternalSymbolPairMap_GS.get(symbol);
          return sa == null ? new SymbolPair(symbol, null) : sa;
      ARCA("C", false, '.', OrderTIF.GTD) {
        public String getStandardizedStockSymbol(String symbol, String suffix) {
          String x = externalSymbolPairToInternalSymbolMap_GS.get(new SymbolPair(symbol, suffix));
          return x == null ? symbol : x;
        public SymbolPair getExchangeSpecificStockSymbol(String symbol) {
          SymbolPair sa = internalSymbolToExternalSymbolPairMap_GS.get(symbol);
          return sa == null ? new SymbolPair(symbol, null) : sa;
      public abstract String getStandardizedStockSymbol(String symbol, String suffix);
      public abstract SymbolPair getExchangeSpecificStockSymbol(String symbol);
      private static Map<SymbolPair, String> externalSymbolPairToInternalSymbolMap_GS = new HashMap<SymbolPair, String>();
      private static Map<SymbolPair, String> externalSymbolPairToInternalSymbolMap_ARCA = new HashMap<SymbolPair, String>();
      private static Map<String, SymbolPair> internalSymbolToExternalSymbolPairMap_GS = new HashMap<String, SymbolPair>();
      private static Map<String, SymbolPair> internalSymbolToExternalSymbolPairMap_ARCA = new HashMap<String, SymbolPair>();
      private static Object[] toArrayOutputArray = null;
      static {
        String SQL = null;
        try {
          Connection c = MySQL.connectToMySQL("xxx", "xxx", "xxx", "xxx");
          SQL = "SELECT symbol, ARCASYMBOL, INETSYMBOL, ARCASYMBOLSUFFIX, INETSYMBOLSUFFIX from oms.tblsymbolnew";
          Statement stmt = c.createStatement();
          ResultSet rs = stmt.executeQuery(SQL);
          while (rs.next()) {
            String symbol = rs.getString("symbol");
            if (rs.getString("ARCASYMBOL") != null) {
              if (!symbol.equals(rs.getString("ARCASYMBOL")) || rs.getString("ARCASYMBOLSUFFIX") != null) {
                String suffix = rs.getString("ARCASYMBOLSUFFIX");
                SymbolPair sp = new SymbolPair(rs.getString("ARCASYMBOL"), suffix);
                internalSymbolToExternalSymbolPairMap_ARCA.put(symbol, sp);
                externalSymbolPairToInternalSymbolMap_ARCA.put(sp, symbol);
        } catch (Exception e) {
          System.out.println(SQL);
          e.printStackTrace();
          System.exit(0);
      static {
        populateSymbolToDestination();
      static Logger logger = Logger.getLogger(OrderExchange.class);
      private static HashMap<String, OrderExchange> symbolToDestination = new HashMap<String, OrderExchange>();
      private final String tag100;
      private final boolean usesSymbolSuffixTag;
      private final char symbolSuffixSeparator;
      private final OrderTIF defaultTif;
      private static final String soh = new String(new char[] { '\u0001' });
      private OrderExchange(String tag100, boolean usesSymbolSuffixTag, char symbolSuffixSeparator, OrderTIF defaultTif) {
        this.tag100 = tag100;
        this.defaultTif = defaultTif;
        this.usesSymbolSuffixTag = usesSymbolSuffixTag;
        this.symbolSuffixSeparator = symbolSuffixSeparator;
      public OrderTIF getDefaultTif() {
        return defaultTif;
      public String getTag100() {
        return tag100;
      public char getSymbolSuffixSeparator() {
        return symbolSuffixSeparator;
      public static OrderExchange getOrderExchangeByExchangeName(String name) {
        for (OrderExchange d : OrderExchange.values()) {
          if (d.toString().equalsIgnoreCase(name.trim())) {
            return d;
        return null;
      Thanks,
    Andrew

    Hi Andrew
    The only way to serialize object, so that they can be used by other languages than Java is to use the Portable Object Format.
    The implementation of this requires you to implement the PortableObject interface in Java. PortableObject defines two methods
    public void readExternal(PofReader reader);
    public void writeExternal(PofWriter writer);
    Also you need to add a POF config file that ties the type to a type id.
    In C++ each type needs two template methods implemented to seralize and deserialize. But first it needs to register the data type with the same type id as for the Java type using the COH_REGISTER_MANAGED_CLASS macro.
    Secondly analogs to Java implement the serializer stubs
    template<> void serialize<Type>(PofWriter::Handle hOut, const Type& type);
    template<> Type deserialize<Type>(PofReader::Handle hIn);
    For C# your serializable types need to implement IPortableObject, with it's two methods:
    void IPortableObject.ReadExternal(IPofReader reader);
    void IPortableObject.WriteExternal(IPofWriter writer);
    Similar to Java C# uses a POF configuration file, the same type id should bind to the corresponding C# type.
    For more information see
    POF Configuation: http://coherence.oracle.com/display/COH34UG/POF+User+Type+Configuration+Elements
    C++: http://coherence.oracle.com/display/COH34UG/Integrating+user+data+types
    C#: http://wiki.tangosol.com/display/COHNET33/Configuration+and+Usage#ConfigurationandUsage-PofContext
    Hope that helps!
    /Charlie
    Edited by: Charlie Helin on Apr 30, 2009 12:31 PM

Maybe you are looking for

  • Amount not getting displayed in the cube

    Hi, I have a ZTable which has got an Amount field declared like this. AMOUNT     WAERS     CUKY     5     0     Currency Key And I declared a ZAMOUNT as Amount in the cube and provided 0CURRENCY. Initially there was no value in the Amount column in t

  • "Firefox can't find the server" extende periods of the day on my WIFI and slow at the same time on my AT&T G3.

    Back in late August, I began having intermittant problems loging onto my websites. primarily Sunday and Monday nights almost always down. Now I am having more trouble and at more different times. However there are periods of time during the day when

  • Can't re install Mountain Lion

    Hi, Long story short: Have Mountain Lion installed on my early 09 iMac with 8 gigs ram Filled up my orignial internal HD; Had Mac Store put in a new internal HD They must have installed Leopard or some eariler OS on it; when I got it home I was surpr

  • Adjust photo order?

    How do I change the date on a photo in an album? Some photos are in the wrong order and I want to change that by either adjusting the date or moving them in some other way. Thanks Jen

  • Hi createpo workflow

    Hi, Purchasing integrates with Oracle Workflow technology to create standard purchase orders or blanket releases automatically from approved requisition lines. The workflow for creating purchasing documents automatically is called PO Create Documents