users@glassfish.java.net

Cache synchronization in Toplink JPA 10.1.3.3

From: <glassfish_at_javadesktop.org>
Date: Sun, 24 Aug 2008 10:28:27 PDT

Hello,

I have developed a simple proof-of-concept application. It utilizes Toplink JPA to access Oracle table and insert a record. I have deployed this same application onto two separate application servers. I want to configure a cache synchronization among them.

I want to be able have one standalone client as shown below to insert a record

            final Context context = getInitialContext();
            FingerprintImage fingerprintImage = (FingerprintImage)context.lookup("FingerprintImage");
            
            long eid = 0;
             
             byte[] fingerPrintImage13 = getMessages("d:\\Bid13.bin");

             Timestamp ts = new Timestamp(new java.util.Date().getTime());

             IdtIsrs idtisrs = new IdtIsrs();
             eid = nextLong(310000);
             idtisrs.setEid(eid);
             idtisrs.setBid(new Long(7));
             idtisrs.setImage(fingerPrintImage13);
             idtisrs.setSharedImageCd(new Long(3));
             idtisrs.setCreateDt(ts);
             fingerprintImage.persistEntity(idtisrs);

and have the other client somehow access to other server to access this newly inserted record from the cache. How can I do that in Toplink JPA using RMI? Any help would be much appreciated.

Thanks,

Mustafa
[Message sent by forum member 'mcayci' (mcayci)]

http://forums.java.net/jive/thread.jspa?messageID=295032