Performance consistency POF vs Java Seriailization...

Hello
I tried to compare the performance of Java vs consistency POF serialization so I wrote some examples of classes in order to compare the time taken to serialize and the size of the byte array created to contain the serialized bits. I found that the simple objects Java serialization has given the better results than the POF. I write the code online. Can you get it someone please let me know if the comments are correct or if a different approach should be taken for POF serialization?

Thank you.
Raphy


These are the statistics kept for 1000 serialization of objects...

time to serialize an object in nano seconds 9744954 Java

time for pof serialization of an object in nano seconds 64662544

Total time required for java serialization of objects 1000 in nano seconds 57661927

Total time required for pof serialization of objects 1000 in nano seconds 90891948

Size of table of the total number of bytes for java serialization is 403890
Size of table of the total number of bytes for the serialization of pof is 1029000

The code is pasted below...

serializable Java object
package com.apx.core.test.serialization;

import java.io.Serializable;
import java.util.Date;

/ public class JavaSerializable implements Serializable {}

private String name;
Field1 double private;
Field2 long private;
field3 Double private;
Field4 Long private;
private Date dateField;

public String getName() {}
return the name.
}
public void setName (String name) {}
myIdName = name;
}
{} public double getField1()
return of field1;
}
public void setField1 (double Field1) {}
This.Field1 = field1;
}
{} public long getField2()
return Field2;
}
public void setField2 (long Field2) {}
This.Field2 = Field2;
}
{} public Double getField3()
return of field3;
}
public void setField3 (Double field3) {}
This.field3 = field3;
}
{} public Long getField4()
return of field4;
}
public void setField4 (Long field4) {}
This.Field4 = field4;
}
public Date getDateField() {}
return dateField;
}
{} public void setDateField (Date dateField)
this.dateField = dateField;
}

}

Object serializable POF
package com.apx.core.test.serialization;

import java.io.IOException;
import java.util.Date;

import com.tangosol.io.pof.PofReader;
import com.tangosol.io.pof.PofWriter;
import com.tangosol.io.pof.PortableObject;

/ public class POFSerializable implements PortableObject {}
public static final int TYPE_ID = 100;

private String name;
Field1 double private;
Field2 long private;
field3 Double private;
Field4 Long private;
private Date dateField;

public String getName() {}
return the name.
}
public void setName (String name) {}
myIdName = name;
}
{} public double getField1()
return of field1;
}
public void setField1 (double Field1) {}
This.Field1 = field1;
}
{} public long getField2()
return Field2;
}
public void setField2 (long Field2) {}
This.Field2 = Field2;
}
{} public Double getField3()
return of field3;
}
public void setField3 (Double field3) {}
This.field3 = field3;
}
{} public Long getField4()
return of field4;
}
public void setField4 (Long field4) {}
This.Field4 = field4;
}
public Date getDateField() {}
return dateField;
}
{} public void setDateField (Date dateField)
this.dateField = dateField;
}


@Override
public String toString() {}
Return "POFSerializable [dateField =" dateField + ', Field1 =' + field1
+ ', Field2 =' + Field2 + ', field3 =' + field3 + ', field4 ='
field4 + ', name =' + name + '] ';
}

@Override
Public Sub readExternal (PofReader arg0) throws IOException {}
myIdName = arg0.readString (0);
This.Field1 = arg0.readDouble (1);
This.Field2 = arg0.readLong (2);
This.field3 = arg0.readDouble (3);
This.Field4 = arg0.readLong (4);
this.dateField = arg0.readDate (5);


}

@Override
Public Sub writeExternal (PofWriter arg0) throws IOException {}
arg0. WriteString (0, myIdName);
arg0.writeDouble (1, this.field1);
arg0.writeLong (2, this.field2);
arg0.writeDouble (3, this.field3);
arg0.writeLong (4, this.field4);
arg0.writeDate (5, this.dateField);

}

}

The tester of serialization class
package com.apx.core.test.serialization;

import java.io.ByteArrayOutputStream.
import java.io.IOException;
import java.io.ObjectOutputStream;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import com.tangosol.io.ByteArrayReadBuffer;
import com.tangosol.io.ByteArrayWriteBuffer;
import com.tangosol.io.ReadBuffer.BufferInput;
import com.tangosol.io.WriteBuffer.BufferOutput;
import com.tangosol.io.pof.PortableObjectSerializer;
import com.tangosol.io.pof.SimplePofContext;

public class SerializationTester {}
Private Shared SimplePofContext pofContext = new SimplePofContext();

{public static
pofContext.registerUserType (POFSerializable.TYPE_ID, POFSerializable.class,
new PortableObjectSerializer (POFSerializable.TYPE_ID));

}

private list < JavaSerializable > javaSerialList = new ArrayList < JavaSerializable > ();
private list < POFSerializable > pofSerialList = new ArrayList < POFSerializable > ();

Public Shared Sub pofSerializeObject (exit BufferOutput, Object o) throws IOException
{
pofContext.serialize (output, o);
}

public static Object deserializePofObject (in BufferInput) throws IOException
{
Return (in) pofContext.deserialize;
}

public SerializationTester() {}

for (int i = 0; i < 1000; ++ i)
{
Serializable JavaSerializable = new JavaSerializable();
POFSerializable pofSerializable = new POFSerializable();
javaSerialList.add (serializable);
pofSerialList.add (pofSerializable);
initialize the java serializable objects...
serializable.setName ("Name" + i);
serializable.setField1 (Double.MAX_VALUE);
serializable.setField2 (Long.MAX_VALUE);
serializable.setField3 (Double.MAX_VALUE);
serializable.setField4 (Long.MAX_VALUE);
serializable.setDateField (new Date());

initialize the POF serializable objects...
pofSerializable.setName ("Name" + i);
pofSerializable.setField1 (Double.MAX_VALUE);
pofSerializable.setField2 (Long.MAX_VALUE);
pofSerializable.setField3 (Double.MAX_VALUE);
pofSerializable.setField4 (Long.MAX_VALUE);
pofSerializable.setDateField (new Date());
}

}

Public Sub getJavaSerializationStats() throws Exception
{
List of < byte [] > objectSizes = new ArrayList < byte [] > ();
long totalTime = 0;

int count = 0;
for (instance of JavaSerializable: javaSerialList)
{

long beginTime = System.nanoTime ();
Byte [] objectBits = serializeObject (instance);
long finishTime = System.nanoTime ();
totalTime += (finishTime - beginTime);
objectSizes.add (objectBits);
if(Count==0)
{
System.out.println ("time to serialize an object in nano seconds of java" + (finishTime - beginTime));
}
++ count;
}
System.out.println ("Time taken to java serialization of objects 1000 in nano seconds Total" + (totalTime));
totalLength length = 0;
for (byte [] bs: objectSizes) {}
totalLength += bs.length;
}
System.out.println ("size of table of the Total number of bytes for a serialization java is" + totalLength);
}

Public Sub getPOFSerializationStats() throws IOException
{
List of < byte [] > objectSizes = new ArrayList < byte [] > ();
long totalTime = 0;

int count = 0;
BufferWriter ByteArrayWriteBuffer = new ByteArrayWriteBuffer (1);
for (instance of POFSerializable: pofSerialList)
{

long beginTime = System.nanoTime ();
pofSerializeObject (bufferWriter.getBufferOutput (), for example);
long finishTime = System.nanoTime ();
totalTime += (finishTime - beginTime);

objectSizes.add (bufferWriter.getRawByteArray ());

if(Count==0)
{
System.out.println ("TimeFor pof serialization of an object in nano seconds" + (finishTime - beginTime));
}
++ count;
}

System.out.println ("Time taken to pof serialization of objects 1000 in nano seconds Total" + (totalTime));
now read the objects to return...
totalLength length = 0;
for (byte [] bs: objectSizes) {}

totalLength += bs.length;
ByteArrayReadBuffer readBuffer = new ByteArrayReadBuffer (bs);
Object obj = deserializePofObject (readBuffer.getBufferInput ());
System.out.println (obj);
}
System.out.println ("table size to the Total number of bytes for the serialization of pof is" + totalLength);
}

Public Shared Sub main (String [] args) throws exceptions
{
Tester SerializationTester = new SerializationTester();
tester.getJavaSerializationStats ();
tester.getPOFSerializationStats ();

}

private byte [] serializeObject (Object, object) {}
try {}
ByteArrayOutputStream Bos = new ByteArrayOutputStream();
ObjectOutputStream out = new ObjectOutputStream (bos);
out.writeObject (object);
out. Close();

message from Byte [] = bos.toByteArray ();
return the message;
} catch (IOException e) {}
throw new RuntimeException (e);
}
}


}

Published by: user10928746 on March 23, 2009 15:33

Hi Raphy,

You should not use the getRawByteArray method, first because it is private to the buffer, secondly because it returns an array that is greater than the actually used amount of bytes. Similar in internal table of a StringBuffer, while toByteArray is similar to a new string with a correct internal character array returned by the toString method of the StringBuffer.

Instead, you must use the toByteArray method which returns an array of bytes which is only as long as necessary, so the length is correct.

In addition, I would take your time with a grain of salt values you POF serialization at an unfair disadvantage because it always starts with a byte of an array, and must reassign, possibly several times. Coherence itself collects the stats of the objects it serializes and pré-alloue a buffer that is probably wide enough so that no reallocation will be necessary.

Also, you collect a large memory footprint by running your code in a loop and maintaining arrays of bytes that could lead to global catalogs that may influence the outcome of your time, more clearly that you have more objects, and part of your test POF has more objects because all Java serialized objects are always kept in a Member If your test is again a bias against the POF.

Best regards

Robert

Tags: Fusion Middleware

Similar Questions

  • Poor Oracle Performance consistency running concurrent queries

    We have 600 million records in the cache must be retrieved on queries (filter or Multi Extractor, we tried both), but we are faced with poor performance when we increase concurrency, we use 5 son of job by node Manager representing a total of 300 sons, we are not able to get a rate higher than 400 records/s (that is, each node consistency to recover 6 records/s) It would take too long (nearly 20 days) to 600 M of process records. This means that consistent performance are poor until the database.

    The improvements that we tried:

    We have created the index (index simple and compound), implemented from POF, tunned shuts down the JVM to reduce the GC, configured network communication (doesn't any sense cause we run everything on the same machine, but we tried), increased coherence nets, implemented best practices and after all, we tried to run on Exalogic , and after all, we had the same problem.

    The material on our tests, we used:

    -Dell R910 with 1 TB of Ram and 80 processors;

    -Oracle Exalogic X 3.

    Each node consistency is using 16 GB of Ram, and we use a distributed Cache.

    Before dropping out of coherence I would like to know if there is something more, we can try.

    We opened the SR and after many tests, that we abandoned consistency, we changed the technology, and now the Solution works well. We understood that the consistency is just for the cache and not for intensive query.

  • Some performance useful tips in Java using the blackberry for the graphics classes.

    BB Storm JDE 4.7.0

    I did a lot of recent graphics involving polygons, transformations on the peaks and summits. I found a lot of useful tips that may be of interest to you.

    1. for storage of the summits, I used a vector I could use addElement to add points in real time. However, later, I went to aVector and byteVector to manage the peaks and the offsets of the RIM.

    2. I used drawFilledPath, etc. in the RIM Graphics class to draw and fill polygons.

    3. originally I used ints as vertices but I found that when I turned a polygon around 360 degrees in increments of 10 degrees and the time wherever it has been done, error totalled so that the polygon shape had changed quite substantially. I started using the Fixed32 and VecMath classes. VecMath classes you create affine transformation matrices and operations using homogeneous coords. It also uses the Fixed32. Thus, using VecMath, Fixed32 and aVector greatly improved accuracy, efficiency and cleanliness of my design.

    Fixed32 also had math at comma fixed trig functions of rotation too.

    I hope it's useful to someone.

    D

    It's just a news feed so I'll end it here.

  • java.lang.ClassCastException: com.tangosol.io.pof.PortableException

    Hello

    I'm using 3.4.2 coherence and consistency for .NET. I managed to get my .NET client, speaking to the cluster of coherence. However, now I want to get a java client to do the same thing. (I want to connect to an extension node)

    The Java client throws this exception

    ************
    2009-04-23 13:57:01.534/6.500 Oracle coherence 3.4.2/411 < Info > (thread = main Member, = n/a): responsible operational configuration of resource 'jar:file:/C:/opt/Oracle/coherence/lib/coherence.jar!/tangosol-coherence.xml '.
    2009-04-23 13:57:01.550/6.516 Oracle coherence 3.4.2/411 < Info > (thread = main Member, = n/a): responsible for operational substitutions of the resource 'jar:file:/C:/opt/Oracle/coherence/lib/coherence.jar!/tangosol-coherence-override-dev.xml '.
    2009-04-23 13:57:01.550/6.516 Oracle coherence 3.4.2/411 < D5 > (thread = main Member, = n/a): configuration optional override ' / tangosol-coherence - override.xml ' is not specified
    2009-04-23 13:57:01.565/6.531 Oracle coherence 3.4.2/411 < D5 > (thread = main Member, = n/a): configuration optional override "/ custom - mbeans.xml ' is not specified

    Consistency of Oracle Version 3.4.2/411
    Grid edition: development Mode
    Copyright (c) 2000-2009 Oracle. All rights reserved.

    2009-04-23 13:57:02.128/7.094 Oracle coherence GE 3.4.2/411 < Info > (thread = main Member, = n/a): configuration of the loaded cache of the file "H:\pradhan\Java\Coherence\config\cache-extend-config.xml".
    2009-04-23 13:57:02.597/7.563 Oracle coherence GE 3.4.2/411 < D5 > (thread = ExtendTcpCacheService:TcpInitiator, Member = n/a): started: TcpInitiator {Name = ExtendTcpCacheService:TcpInitiator, State = (SERVICE_STARTED), ThreadCount = 0, Codec = Codec (Format = POF) [PingInterval = 0, PingTimeout = 5000, RequestTimeout = 5000, ConnectTimeout = 5000, RemoteAddresses=[spmbs008/172.21.194.185:9099,spmbs006/172.21.194.186:9099], KeepAliveEnabled = true, TcpDelayEnabled = false, ReceiveBufferSize = 0, SendBufferSize = 0, LingerTimeout =-1}
    2009-04-23 13:57:02.597/7.563 Oracle coherence GE 3.4.2/411 < D5 > (thread = main Member, = n/a): the opening to 172.21.194.185:9099 Socket connection
    2009-04-23 13:57:02.612/7.578 Oracle coherence GE 3.4.2/411 < Info > (thread = main Member, = n/a): connected to 172.21.194.185:9099
    2009-04-23 13:57:02.659/7.625 Oracle coherence GE 3.4.2/411 < D5 > (thread = ExtendTcpCacheService:TcpInitiator, Member = n/a): stop: TcpInitiator {Name = ExtendTcpCacheService:TcpInitiator, State = (SERVICE_STOPPED), ThreadCount = 0, Codec = Codec (Format = POF) [PingInterval = 0, PingTimeout = 5000, RequestTimeout = 5000, ConnectTimeout = 5000, RemoteAddresses=[spmbs008/172.21.194.185:9099,spmbs006/172.21.194.186:9099], KeepAliveEnabled = true, TcpDelayEnabled = false, ReceiveBufferSize = 0, SendBufferSize = 0, LingerTimeout =-1}
    2009-04-23 13:57:02.675/7.641 Oracle coherence GE 3.4.2/411 < error > (thread = main Member, = n/a): error when starting the service 'ExtendTcpCacheService': com.tangosol.net.messaging.ConnectionException
    to com.tangosol.coherence.component.util.daemon.queueProcessor.service.peer.initiator.TcpInitiator$ TcpConnection$ TcpReader.onNotify (TcpInitiator.CDB:46)
    at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:37)
    at java.lang.Thread.run (unknown Source)
    Caused by: java.io.EOFException
    at java.io.DataInputStream.readUnsignedByte (unknown Source)
    at com.tangosol.util.ExternalizableHelper.readInt(ExternalizableHelper.java:493)
    to com.tangosol.coherence.component.util.daemon.queueProcessor.service.peer.initiator.TcpInitiator$ TcpConnection$ TcpReader.onNotify (TcpInitiator.CDB:20)
    at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:37)
    at java.lang.Thread.run (unknown Source)
    ************

    and when I look at the extend on the cluster node, I see this

    ************
    23/04/09 13:56:38.899 INFO: [DiagnosticsPlugin] [m: 73 M / 494 M / 494 M] [T: d 2 O (54)] [5.1.0.21] [JRE: 1.5.0_08/Sun Microsystems Inc..] [OS: Windows 2003/5.2/x86] [H: 172.21.194.185]
    2009-04-23 13:57:02.335/4529.301 Oracle coherence GE < error > 3.4.2/411 (thread = Proxy: ExtendTcpProxyService:TcpAcceptor members = 2): an exception occurred while decoding of a Service Message = Proxy: ExtendTcpProxyService:TcpAcceptor received: TcpConnection (Id = null, Open = true, LocalAddress = 172.21.194.185:9099, RemoteAddress = 11.176.203.168:2585): java.lang.ClassCastException: com.tangosol.io.pof.PortableException
    to com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer$ MessageFactory$ OpenConnectionRequest.readExternal (Peer.CDB:6)
    at com.tangosol.coherence.component.net.extend.Codec.decode(Codec.CDB:29)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer.decodeMessage(Peer.CDB:25)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer.onNotify(Peer.CDB:47)
    at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:37)
    at java.lang.Thread.run(Thread.java:595)
    ************

    I wonder what I'm doing wrong.

    My group, I have this defined (extracted from the cache - extend - config.xml)

    ************
    < serializer >
    > class name < com.tangosol.io.pof.ConfigurablePofContext < / class name >
    < init-params >
    < init-param >
    type string < param > < / param-type >
    < param-value > custom-types-pof - config.xml < / param-value >
    < / init-param >
    < / init-params >
    < / serializer >
    ************

    and

    ************
    <? XML version = "1.0"? >
    <! Pof-config SYSTEM DOCTYPE "pof - config.dtd" >
    < pof-config >
    < user-type-list >
    <!-include all the 'standard' consistency POF user types->
    < include > example-pof - config.xml < / include >
    < / user-type-list >
    < / pof-config >
    ************

    My client, I have the following

    -Dtangosol.coherence.CacheConfig=./config/cache-extend-config.XML-Dtangosol.POF.config=./config/POF-config.XML

    ************
    <? XML version = "1.0"? >
    <! Pof-config SYSTEM DOCTYPE "pof - config.dtd" >
    < pof-config >
    < user-type-list >
    < include > example-pof - config.xml < / include >
    < / user-type-list >
    < / pof-config >
    ************


    ************
    <? XML version = "1.0"? >
    < cache-config xmlns = "http://schemas.tangosol.com/cache" >
    < cache-system-mapping >
    <>cache-mapping
    < name of cache - > * < / cache-name >
    < scheme name > cache distributed < / system-name >
    < / cache-mapping >
    < / cache-system-mapping >

    <>- cached patterns
    < remote-cache-system >
    < scheme name > cache distributed < / system-name >
    < service name > ExtendTcpCacheService < / service-name >
    < initiator-config >
    <>tcp-initiator
    <>remote addresses
    > the socket address <
    spmbs008 < address > < / address >
    < port > 9099 < / port >
    < / socket-address >
    > the socket address <
    spmbs006 < address > < / address >
    < port > 9099 < / port >
    < / socket-address >
    < / remote-address >
    < / tcp-initiator >

    < outgoing-message Manager >
    < request-timeout > s 5 < / timeout request >
    < / Manager of outbound messages >
    < / initiator-config >
    < serializer >
    > class name < com.tangosol.io.pof.ConfigurablePofContext < / class name >
    < init-params >
    < init-param >
    Type string < param > < / param-type >
    < param-value > pof - config.xml < / param-value >
    < / init-param >
    < / init-params >
    < / serializer >
    < / remote-cache-system >
    < / cache-plans >
    < / cache-config >
    ************

    Not sure if I'm doing something wrong. I just want to be able to talk to the same cache via Java and .NET
  • Exception of consistency 3.6.1 - p1 PutAll (maybe a bug?)

    Hi all

    I'm getting the following exception (client side) only when I use 3.6.1 - p1 of consistency (I tried 3.6.0 and 3.6.1 and they work fine):

    2011-02-16 15:15:48.013/81.450 Oracle coherence GE 3.6.1.1 < error > (thread = main Member, = n/a): an exception occurred in coding a PutAllRequest service = ExtendTcpCacheService:TcpInitiator: java.lang.IllegalArgumentException
    to com.tangosol.io.ByteArrayWriteBuffer. < init > (ByteArrayWriteBuffer.java:76)
    to com.tangosol.io.ByteArrayWriteBuffer. < init > (ByteArrayWriteBuffer.java:58)
    to com.tangosol.util.BinaryWriteBuffer. < init > (BinaryWriteBuffer.java:28)
    to com.tangosol.util.ExternalizableHelper$ Stats.allocate (ExternalizableHelper.java:2904)
    at com.tangosol.io.MultiBufferWriteBuffer.addBuffer(MultiBufferWriteBuffer.java:1069)
    to com.tangosol.io.MultiBufferWriteBuffer. < init > (MultiBufferWriteBuffer.java:36)
    to com.tangosol.util.ExternalizableHelper$ Stats.instantiateBuffer (ExternalizableHelper.java:2850)
    at com.tangosol.util.ExternalizableHelper.serializeInternal(ExternalizableHelper.java:2540)
    at com.tangosol.util.ExternalizableHelper.toBinary(ExternalizableHelper.java:210)
    to com.tangosol.coherence.component.net.extend.RemoteNamedCache$ ConverterToBinary.convert (RemoteNamedCache.CDB:4)
    to com.tangosol.util.ConverterCollections$ AbstractConverterEntry.getValue (ConverterCollections.java:3403)
    at com.tangosol.io.pof.PofBufferWriter.writeMap(PofBufferWriter.java:1977)
    to com.tangosol.coherence.component.net.extend.messageFactory.NamedCacheFactory$ PutAllRequest.writeExternal (NamedCacheFactory.CDB:3)
    at com.tangosol.coherence.component.net.extend.Codec.encode(Codec.CDB:23)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer.encodeMessage(Peer.CDB:23)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer.send(Peer.CDB:16)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer.post(Peer.CDB:23)
    at com.tangosol.coherence.component.net.extend.Channel.post(Channel.CDB:25)
    at com.tangosol.coherence.component.net.extend.Channel.request(Channel.CDB:18)
    at com.tangosol.coherence.component.net.extend.Channel.request(Channel.CDB:1)
    to com.tangosol.coherence.component.net.extend.RemoteNamedCache$ BinaryCache.putAll (RemoteNamedCache.CDB:10)
    to com.tangosol.util.ConverterCollections$ ConverterMap.putAll (ConverterCollections.java:1607)
    at com.tangosol.coherence.component.net.extend.RemoteNamedCache.putAll(RemoteNamedCache.CDB:1)
    at com.tangosol.coherence.component.util.SafeNamedCache.putAll(SafeNamedCache.CDB:1)
    at com.rbs.hpc.incubator.driver.DriverTestDelta.run(DriverTestDelta.java:78)
    at test.performance.DeltaBackupsPerformanceTest.main(DeltaBackupsPerformanceTest.java:20)

    This is the test case, I am running:
    A sequence of operations putAll to load the cluster:
    -Whole keys and simple byte array objects (10000 bytes).
    -PutAll lot size is 1,000.
    -4 storage nodes and 1 proxy (2 GB each), all in one machine.

    After the insertion of objects about 195000 I get this exception...

    Other info:
    -Change the batchSize has no effect;
    -For the increase in the size of the byte array that the exception is thrown earlier (for example, after approximately 130000 objects with size of array of 15000 bytes).

    Any thoughts?

    Thank you
    Alberto

    Hello Alberto,.

    It sounds like COH-4471, which should be included in 3.6.1p2

    Thank you
    -Rob

  • consistency check runs on Windows, but faield on Linux

    Hello:

    I do run a DefaultCacheServer instance on my Windows XP machine and start a JUnit test to load a bounch of objects that are generated from a source csv file; Server and the client using a custom configuration. Pof file is also defined by the class of the object in question. The customer node is not used as a storage device.

    All the above worked fine.

    Now I transfer the code to Linux, and I started DefaultCacheServer without a problem. However, when I started the client, he doesn't have to load objects in the server cache. The error message states:

    2011-08-31 15:14:21.533/1.653 Oracle coherence GE 3.7.0.0 < error > (thread = Cluster, Member = 2): this cluster node is configured to use the serializer com.tangosol.io.pof.ConfigurablePofContext {location=/home/XXXX/config/pof-config.xml}, which seems to differ from the serializer used by Member (Id = 1, Timestamp = 2011-08-31 15:13:50.292, Address = xx.xx.xx.xx:XXXX, MachineId = role XXXXX, Location = site: xxxxx.com, machine: xxxxxx, process:xxxxxx, = CoherenceServer).
    java.io.StreamCorruptedException: type =-261969
    at com.tangosol.io.pof.PofHelper.skipUniformValue(PofHelper.java:1226)
    at com.tangosol.io.pof.PofHelper.skipValue(PofHelper.java:1013)
    to com.tangosol.io.pof.PofBufferReader$ UserTypeReader.readRemainder (PofBufferReader.java:3660)

    ....


    Of this logging information, can anyone tell what went wrong?

    Thank you
    John

    Hi John,.

    This has nothing to do with the o/s but the default consistency by using java.io.serialization to serialize the objects and you must specify explicitly if you want to use POF for serialization. You can specify the serializer to the level of the service in the configuration of cache coherence, either you specify the system property - Dtangosol.pof.enabled = true as a java option in the startup script, but it will allow the POF for the JVM together. In addition, you must specify your configuration pof using - Dtangosol.pof.config = "CONFIG_FILE_PATH". This must be done for the cache server and the client. An incompatibility of the serialization of type on the client and the server causes the error.

    You can go through the document http://coherence.oracle.com/display/COH35UG/The+Portable+Object+Format for more options.

    I hope this helps!

    See you soon,.
    NJ

  • Missing configuration of POF

    Could if it you please let me know what the problem with my code.

    <? XML version = "1.0" encoding = "UTF-8"? >

    <! SYSTEM cache-config DOCTYPE "cache - config.dtd" >

    <>cache-config
    < cache-system-mapping >
    <>cache-mapping
    < name-cache > cacheEquityMarket < / cache-name >
    < scheme name > distributed cache1 < / system-name >
    < init-params >
    < init-param >
    java.lang.String < param-name > < / param-name >
    {cache name} < param-value > < / param-value >
    < param-name > local storage < / param-name >
    < param-value of the property system 'cacheEquityMarket.localstorage' = > true < / param-value >
    < / init-param >
    < / init-params >
    < / cache-mapping >

    <>cache-mapping
    < name-cache > cacheEquityCompany < / cache-name >
    < scheme name > distributed cache2 < / system-name >
    < init-params >
    < init-param >
    java.lang.String < param-name > < / param-name >
    {cache name} < param-value > < / param-value >
    < param-name > local storage < / param-name >
    < param-value of the property system 'cacheEquityCompany.localstorage' = > true < / param-value >
    < / init-param >
    < / init-params >
    < / cache-mapping >

    <>cache-mapping
    < name-cache > cacheEquityHistorical < / cache-name >
    < scheme name > distributed cache3 < / system-name >
    < init-params >
    < init-param >
    java.lang.String < param-name > < / param-name >
    {cache name} < param-value > < / param-value >
    < param-name > local storage < / param-name >
    < param-value of the property system 'cacheEquityHistorical.localstorage' = > true < / param-value >
    < / init-param >
    < / init-params >
    < / cache-mapping >

    <>cache-mapping
    < name-cache > cacheEquityIPO < / cache-name >
    < scheme name > distributed cache4 < / system-name >
    < init-params >
    < init-param >
    java.lang.String < param-name > < / param-name >
    {cache name} < param-value > < / param-value >
    < param-name > local storage < / param-name >
    < param-value of the property system 'cacheEquityIPO.localstorage' = > true < / param-value >
    < / init-param >
    < / init-params >
    < / cache-mapping >

    <>cache-mapping
    < name-cache > cacheDerivativeMaster < / cache-name >
    < scheme name > distributed-cache5 < / system-name >
    < init-params >
    < init-param >
    java.lang.String < param-name > < / param-name >
    {cache name} < param-value > < / param-value >
    < param-name > local storage < / param-name >
    < param-value of the property system 'cacheDerivativeMaster.localstorage' = > true < / param-value >
    < / init-param >
    < / init-params >
    < / cache-mapping >

    <>cache-mapping
    < name-cache > cacheDerivativeMarket < / cache-name >
    < scheme name > distributed cache6 < / system-name >
    < init-params >
    < init-param >
    java.lang.String < param-name > < / param-name >
    {cache name} < param-value > < / param-value >
    < param-name > local storage < / param-name >
    < param-value of the property system 'cacheDerivativeMarket.localstorage' = > true < / param-value >
    < / init-param >
    < / init-params >
    < / cache-mapping >


    <>cache-mapping
    < name-cache > cacheDerivativeHistorical < / cache-name >
    < scheme name > distributed cache7 < / system-name >
    < init-params >
    < init-param >
    java.lang.String < param-name > < / param-name >
    {cache name} < param-value > < / param-value >
    < param-name > local storage < / param-name >
    < param-value of the property system 'cacheDerivativeHistorical.localstorage' = > true < / param-value >
    < / init-param >
    < / init-params >
    < / cache-mapping >

    <>cache-mapping
    < name-cache > cacheMFMaster < / cache-name >
    < scheme name > distributed cache8 < / system-name >
    < init-params >
    < init-param >
    java.lang.String < param-name > < / param-name >
    {cache name} < param-value > < / param-value >
    < param-name > local storage < / param-name >
    < param-value of the property system 'cacheMFMaster.localstorage' = > true < / param-value >
    < / init-param >
    < / init-params >
    < / cache-mapping >

    <>cache-mapping
    < name-cache > cacheMFData < / cache-name >
    < scheme name > distributed cache9 < / system-name >
    < init-params >
    < init-param >
    java.lang.String < param-name > < / param-name >
    {cache name} < param-value > < / param-value >
    < param-name > local storage < / param-name >
    < param-value of the property system 'cacheMFData.localstorage' = > true < / param-value >
    < / init-param >
    < / init-params >
    < / cache-mapping >

    < / cache-system-mapping >

    <>- cached patterns
    < distributed plan >
    < serializer >
    > class name < com.tangosol.io.pof.ConfigurablePofContext < / class name >
    < init-params >
    < init-param >
    Type string < param > < / param-type >
    < param-value > base-entity-pof - config.xml < / param-value >
    < / init-param >
    < / init-params >
    < / serializer >
    < scheme name > distributed cache1 < / system-name >
    < service name > DistributedEqMktService < / service-name >
    <!--
    serializer >
    > class name < com.tangosol.io.pof.ConfigurablePofContext < / class name >
    java.lang.String < init-params > < init-param > < param-type > < / param-type >
    < param-value > base-entity-pof - config.xml < / param-value > < / init-param >
    < / init-params > < / serializer
    ->

    < internal-cache-system >
    < local plan >
    < high-units > 1000 < / high units >
    < expiry delay > 1 m < / timeout >
    < / local plan >
    < / internal-cache-system >
    < support-map-plan >
    < reading-writing-support-map-plan >
    < internal-cache-system >
    schema < class >
    > class name < com.tangosol.util.ObservableHashMap < / class name >
    < / class-system >
    < / internal-cache-system >
    < dumps-plan >
    schema < class >
    > class name < com.fs.framework.cache.cachestores.EquityMarketCacheStore < / class name >
    < init-params >
    < init-param >
    java.lang.String < param-type > < / param-type >
    {cache name} < param-value > < / param-value >
    < / init-param >
    < / init-params >
    < / class-system >
    < / dumps-plan >
    < refreshment-ahead-factor > 0,5 < / refresh-ahead-factor >
    < unalterable > false < / ReadOnly >
    < expiry time > 10 s < / timeout >
    < s flush-delay > 2 < / flush-delay >
    < / reading-writing-support-map-plan >
    < / support-map-plan >
    < autostart > true < / autostart >
    < / distributed plan >

    < distributed plan >
    < serializer >
    > class name < com.tangosol.io.pof.ConfigurablePofContext < / class name >
    < init-params >
    < init-param >
    Type string < param > < / param-type >
    < param-value > base-entity-pof - config.xml < / param-value >
    < / init-param >
    < / init-params >
    < / serializer >
    < scheme name > distributed cache2 < / system-name >
    < service name > DistributedEqCoyService < / service-name >
    < internal-cache-system >
    < local plan >
    < high-units > 1000 < / high units >
    < expiry delay > 1 m < / timeout >
    < / local plan >
    < / internal-cache-system >
    < support-map-plan >
    < reading-writing-support-map-plan >
    < internal-cache-system >
    schema < class >
    > class name < com.tangosol.util.ObservableHashMap < / class name >
    < / class-system >
    < / internal-cache-system >
    < dumps-plan >
    schema < class >
    < class name > - com... fs.framework.cache.cachestores.EquityCompanyCacheStore < / class name >
    < init-params >
    < init-param >
    java.lang.String < param-type > < / param-type >
    {cache name} < param-value > < / param-value >
    < / init-param >
    < / init-params >
    < / class-system >
    < / dumps-plan >
    < refreshment-ahead-factor > 0,5 < / refresh-ahead-factor >
    < unalterable > false < / ReadOnly >
    < expiry time > 10 s < / timeout >
    < s flush-delay > 2 < / flush-delay >
    < / reading-writing-support-map-plan >
    < / support-map-plan >
    < autostart > true < / autostart >
    < / distributed plan >

    < distributed plan >
    < serializer >
    > class name < com.tangosol.io.pof.ConfigurablePofContext < / class name >
    < init-params >
    < init-param >
    Type string < param > < / param-type >
    < param-value > base-entity-pof - config.xml < / param-value >
    < / init-param >
    < / init-params >
    < / serializer >
    < scheme name > distributed cache3 < / system-name >
    < service name > DistributedEqHistService < / service-name >
    < internal-cache-system >
    < local plan >
    < high-units > 1000 < / high units >
    < expiry delay > 1 m < / timeout >
    < / local plan >
    < / internal-cache-system >
    < support-map-plan >
    < reading-writing-support-map-plan >
    < internal-cache-system >
    schema < class >
    > class name < com.tangosol.util.ObservableHashMap < / class name >
    < / class-system >
    < / internal-cache-system >
    < dumps-plan >
    schema < class >
    < class name > - com... fs.framework.cache.cachestores.EquityHistoricalCacheStore < / class name >
    < init-params >
    < init-param >
    java.lang.String < param-type > < / param-type >
    {cache name} < param-value > < / param-value >
    < / init-param >
    < / init-params >
    < / class-system >
    < / dumps-plan >
    < refreshment-ahead-factor > 0,5 < / refresh-ahead-factor >
    < unalterable > false < / ReadOnly >
    < expiry time > 10 s < / timeout >
    < s flush-delay > 2 < / flush-delay >
    < / reading-writing-support-map-plan >
    < / support-map-plan >
    < autostart > true < / autostart >
    < / distributed plan >

    < distributed plan >
    < serializer >
    > class name < com.tangosol.io.pof.ConfigurablePofContext < / class name >
    < init-params >
    < init-param >
    Type string < param > < / param-type >
    < param-value > base-entity-pof - config.xml < / param-value >
    < / init-param >
    < / init-params >
    < / serializer >
    < scheme name > distributed cache4 < / system-name >
    < service name > DistributedEqIPOService < / service-name >
    < internal-cache-system >
    < local plan >
    < high-units > 1000 < / high units >
    < expiry delay > 1 m < / timeout >
    < / local plan >
    < / internal-cache-system >
    < support-map-plan >
    < reading-writing-support-map-plan >
    < internal-cache-system >
    schema < class >
    > class name < com.tangosol.util.ObservableHashMap < / class name >
    < / class-system >
    < / internal-cache-system >
    < dumps-plan >
    schema < class >
    < class name > - com... fs.framework.cache.cachestores.EquityIPOCacheStore < / class name >
    < init-params >
    < init-param >
    java.lang.String < param-type > < / param-type >
    {cache name} < param-value > < / param-value >
    < / init-param >
    < / init-params >
    < / class-system >
    < / dumps-plan >
    < refreshment-ahead-factor > 0,5 < / refresh-ahead-factor >
    < unalterable > false < / ReadOnly >
    < expiry time > 10 s < / timeout >
    < s flush-delay > 2 < / flush-delay >
    < / reading-writing-support-map-plan >
    < / support-map-plan >
    < autostart > true < / autostart >
    < / distributed plan >

    < distributed plan >
    < serializer >
    > class name < com.tangosol.io.pof.ConfigurablePofContext < / class name >
    < init-params >
    < init-param >
    Type string < param > < / param-type >
    < param-value > base-entity-pof - config.xml < / param-value >
    < / init-param >
    < / init-params >
    < / serializer >
    < scheme name > distributed-cache5 < / system-name >
    < service name > DistributedDerivativeMstrService < / service-name >
    < internal-cache-system >
    < local plan >
    < high-units > 1000 < / high units >
    < expiry delay > 1 m < / timeout >
    < / local plan >
    < / internal-cache-system >
    < support-map-plan >
    < reading-writing-support-map-plan >
    < internal-cache-system >
    schema < class >
    > class name < com.tangosol.util.ObservableHashMap < / class name >
    < / class-system >
    < / internal-cache-system >
    < dumps-plan >
    schema < class >
    < class name > - com... fs.framework.cache.cachestores.DerivativeMasterCacheStore < / class name >
    < init-params >
    < init-param >
    java.lang.String < param-type > < / param-type >
    {cache name} < param-value > < / param-value >
    < / init-param >
    < / init-params >
    < / class-system >
    < / dumps-plan >
    < refreshment-ahead-factor > 0,5 < / refresh-ahead-factor >
    < unalterable > false < / ReadOnly >
    < expiry time > 10 s < / timeout >
    < s flush-delay > 2 < / flush-delay >
    < / reading-writing-support-map-plan >
    < / support-map-plan >
    < autostart > true < / autostart >
    < / distributed plan >

    < distributed plan >
    < serializer >
    > class name < com.tangosol.io.pof.ConfigurablePofContext < / class name >
    < init-params >
    < init-param >
    Type string < param > < / param-type >
    < param-value > base-entity-pof - config.xml < / param-value >
    < / init-param >
    < / init-params >
    < / serializer >
    < scheme name > distributed cache6 < / system-name >
    < service name > DistributedDerivativeMktService < / service-name >
    < internal-cache-system >
    < local plan >
    < high-units > 1000 < / high units >
    < expiry delay > 1 m < / timeout >
    < / local plan >
    < / internal-cache-system >
    < support-map-plan >
    < reading-writing-support-map-plan >
    < internal-cache-system >
    schema < class >
    > class name < com.tangosol.util.ObservableHashMap < / class name >
    < / class-system >
    < / internal-cache-system >
    < dumps-plan >
    schema < class >
    > class name < com.fs.framework.cache.cachestores.DerivativeMarketCacheStore < / class name >
    < init-params >
    < init-param >
    java.lang.String < param-type > < / param-type >
    {cache name} < param-value > < / param-value >
    < / init-param >
    < / init-params >
    < / class-system >
    < / dumps-plan >
    < refreshment-ahead-factor > 0,5 < / refresh-ahead-factor >
    < unalterable > false < / ReadOnly >
    < expiry time > 10 s < / timeout >
    < s flush-delay > 2 < / flush-delay >
    < / reading-writing-support-map-plan >
    < / support-map-plan >
    < autostart > true < / autostart >
    < / distributed plan >

    < distributed plan >
    < serializer >
    > class name < com.tangosol.io.pof.ConfigurablePofContext < / class name >
    < init-params >
    < init-param >
    Type string < param > < / param-type >
    < param-value > base-entity-pof - config.xml < / param-value >
    < / init-param >
    < / init-params >
    < / serializer >
    < scheme name > distributed cache7 < / system-name >
    < service name > DistributedDerivativeHistService < / service-name >
    < internal-cache-system >
    < local plan >
    < high-units > 1000 < / high units >
    < expiry delay > 1 m < / timeout >
    < / local plan >
    < / internal-cache-system >
    < support-map-plan >
    < reading-writing-support-map-plan >
    < internal-cache-system >
    schema < class >
    > class name < com.tangosol.util.ObservableHashMap < / class name >
    < / class-system >
    < / internal-cache-system >
    < dumps-plan >
    schema < class >
    > class name < com.fs.framework.cache.cachestores.DerivativeHistoricalCacheStore < / class name >
    < init-params >
    < init-param >
    java.lang.String < param-type > < / param-type >
    {cache name} < param-value > < / param-value >
    < / init-param >
    < / init-params >
    < / class-system >
    < / dumps-plan >
    < refreshment-ahead-factor > 0,5 < / refresh-ahead-factor >
    < unalterable > false < / ReadOnly >
    < expiry time > 10 s < / timeout >
    < s flush-delay > 2 < / flush-delay >
    < / reading-writing-support-map-plan >
    < / support-map-plan >
    < autostart > true < / autostart >
    < / distributed plan >

    < distributed plan >
    < serializer >
    > class name < com.tangosol.io.pof.ConfigurablePofContext < / class name >
    < init-params >
    < init-param >
    Type string < param > < / param-type >
    < param-value > base-entity-pof - config.xml < / param-value >
    < / init-param >
    < / init-params >
    < / serializer >
    < scheme name > distributed cache8 < / system-name >
    < service name > DistributedMFMstrService < / service-name >
    < internal-cache-system >
    < local plan >
    < high-units > 1000 < / high units >
    < expiry delay > 1 m < / timeout >
    < / local plan >
    < / internal-cache-system >
    < support-map-plan >
    < reading-writing-support-map-plan >
    < internal-cache-system >
    schema < class >
    > class name < com.tangosol.util.ObservableHashMap < / class name >
    < / class-system >
    < / internal-cache-system >
    < dumps-plan >
    schema < class >
    > class name < com.fs.framework.cache.cachestores.MFMasterCacheStore < / class name >
    < init-params >
    < init-param >
    java.lang.String < param-type > < / param-type >
    {cache name} < param-value > < / param-value >
    < / init-param >
    < / init-params >
    < / class-system >
    < / dumps-plan >
    < refreshment-ahead-factor > 0,5 < / refresh-ahead-factor >
    < unalterable > false < / ReadOnly >
    < expiry time > 10 s < / timeout >
    < s flush-delay > 2 < / flush-delay >
    < / reading-writing-support-map-plan >
    < / support-map-plan >
    < autostart > true < / autostart >
    < / distributed plan >

    < distributed plan >
    < serializer >
    > class name < com.tangosol.io.pof.ConfigurablePofContext < / class name >
    < init-params >
    < init-param >
    Type string < param > < / param-type >
    < param-value > base-entity-pof - config.xml < / param-value >
    < / init-param >
    < / init-params >
    < / serializer >
    < scheme name > distributed cache9 < / system-name >
    < service name > DistributedMFDataService < / service-name >
    < internal-cache-system >
    < local plan >
    < high-units > 1000 < / high units >
    < expiry delay > 1 m < / timeout >
    < / local plan >
    < / internal-cache-system >
    < support-map-plan >
    < reading-writing-support-map-plan >
    < internal-cache-system >
    schema < class >
    > class name < com.tangosol.util.ObservableHashMap < / class name >
    < / class-system >
    < / internal-cache-system >
    < dumps-plan >
    schema < class >
    > class name < com.fs.framework.cache.cachestores.MFDataCacheStore < / class name >
    < init-params >
    < init-param >
    java.lang.String < param-type > < / param-type >
    {cache name} < param-value > < / param-value >
    < / init-param >
    < / init-params >
    < / class-system >
    < / dumps-plan >
    < refreshment-ahead-factor > 0,5 < / refresh-ahead-factor >
    < unalterable > false < / ReadOnly >
    < expiry time > 10 s < / timeout >
    < s flush-delay > 2 < / flush-delay >
    < / reading-writing-support-map-plan >
    < / support-map-plan >
    < autostart > true < / autostart >
    < / distributed plan >
    < / cache-plans >
    < / cache-config >



    <? XML version = "1.0"? >
    <! Pof-config SYSTEM DOCTYPE "pof - config.dtd" >
    < pof-config >
    < user-type-list >
    <! - consistency POF user types - >
    < include > coherence-pof - config.xml < / include >
    <!-com.tangosol.examples package->
    Type < user >
    < type id > 1001 < / id-type >
    > class name < com.fs.framework.cache.model.BaseCacheEntity < / class name >
    < / user type >
    < / user-type-list >
    < allow-interfaces > true < / allow interfaces >
    true < subclasses allow > < / subclasses allow >
    < / pof-config >



    package com.fs.framework.cache.model;

    import java.io.IOException;
    import java.io.Serializable;

    Import org.apache.log4j.Logger;

    import com.tangosol.io.pof.PofReader;
    import com.tangosol.io.pof.PortableObject;
    import com.tangosol.io.pof.PofWriter;
    import com.tangosol.util.Base;
    / public class BaseCacheEntity implements PortableObject {}


    public BaseCacheEntity() {}

    TODO auto-generated constructor stub
    }
    public BaseCacheEntity (String data type, String data) {}
    Super();
    this.dataType = type of data;
    This.Data = data;
    }

    private static Logger logger = Logger.getLogger (BaseCacheEntity.class);
    in the string data type private;
    private string data;
    public String getDataType() {}
    Returns the type of data;
    }
    {} public void setDataType (String dataType)
    this.dataType = type of data;
    }
    public String GetData {}
    return data;
    }
    {} public void setData (String data)
    This.Data = data;
    }
    @Override
    Public Sub readExternal (PofReader pofReader) throws IOException {}
    TODO self-generating method stub
    this.setData ((String) pofReader.readObject (0));
    this.setDataType ((String) pofReader.readObject (1));
    }
    @Override
    Public Sub writeExternal (PofWriter pofWriter) throws IOException {}
    TODO self-generating method stub
    pofWriter.writeObject (0, this.getData ());
    pofWriter.writeObject (1, this.getDataType ());
    }




    }

    2010-06-24 21:13:33.861/211.255 Oracle coherence GE 3.5.3/465 < D5 > (thread = Cluster, Member = n/a): Service de Cluster has joined the cluster with the senior members of the service s/o
    2010-06-24 21:13:34.064/211.458 Oracle coherence GE 3.5.3/465 < Info > (thread = Cluster, Member = n/a): this member (Id = 3, Timestamp = 2010-06-24 21:13:33.587, address = 172.17.89.51:8088, MachineId = 58419, Location = site: India.com, machine: 01HW136561, process:4124, role is WeblogicServer, edition = Grid Edition, Mode = development, CpuCount = 2, SocketCount = 1) arrival to the cluster ' cluster: 0xDDEB ' with upper limbs (Id = 2, Timestamp = 2010-06-22 19:22:43.104, address = 172.17.88.171:8089 MachineId = 58795 rental = site: India.com, machine: 01HW133294, process:1304, Role = CoherenceConsole = Grid Edition edition, Mode = development, CpuCount = 2, SocketCount = 1)
    2010-06-24 21:13:34.080/211.474 Oracle coherence GE 3.5.3/465 < error > (thread = Cluster, Member = n/a): a (java.lang.IllegalStateException) exception occurred reading Message MemberConfigResponse Type = 2 for Service = ClusterService {name = Cluster, status = (SERVICE_STARTED, STATE_JOINED), Id = 0, Version = 3.5, OldestMemberId = 2}
    2010-06-24 21:13:34.080/211.474 Oracle coherence GE 3.5.3/465 < error > (thread = Cluster, Member = n/a): StopRunning ClusterService {name = Cluster, status = (SERVICE_STARTED, STATE_JOINED), Id = 0, Version = 3.5, OldestMemberId = 2} due to an unhandled exception:
    2010-06-24 21:13:34.080/211.474 Oracle coherence GE < error > 3.5.3/465 (thread = Cluster, Member = n/a):
    java.lang.IllegalStateException: configuration of POF missing (Config=C:\com\fs-base-framework\src\resources\base-entity-pof-config.xml)
    at com.tangosol.io.pof.ConfigurablePofContext.report(ConfigurablePofContext.java:1311)
    at com.tangosol.io.pof.ConfigurablePofContext.createPofConfig(ConfigurablePofContext.java:803)
    at com.tangosol.io.pof.ConfigurablePofContext.initialize(ConfigurablePofContext.java:762)
    at com.tangosol.io.pof.ConfigurablePofContext.setContextClassLoader(ConfigurablePofContext.java:325)
    at com.tangosol.util.ExternalizableHelper.ensureSerializer(ExternalizableHelper.java:286)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.Service.ensureSerializer(Service.CDB:25)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.Service.ensureSerializer(Service.CDB:1)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.Service.readObject(Service.CDB:4)
    to com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid$ ServiceConfigMap.readObject (Grid.CDB:1)
    to com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid$ MemberConfigResponse.read (Grid.CDB:13)

    Published by: tally_15 on June 24, 2010 08:54

    Can you try to put the full path of the file in the cache configuration xml file? Something like this:


    com.tangosol.io.pof.ConfigurablePofContext


    file:///com/FS-base-framework/src/resources/base-entity-POF-config.XML
    String


    Serge

  • Configure the array of primitive type for POF

    My impression is the implementation of this coherence POF can handle Java primitive and default String so we do not need to provide a custom configuration POF file if the item being cached is Java primitive type.

    How about arrary of primitive type? For example, byte []. Then implementation of consistency POF manage byte [] as well?

    Hello

    Arrays of primitives should work. Do you have a question or are you just a question?

    Thank you
    Tom

  • POF and objects in a schema-TCP ExternalizableLite extend unique proxy

    We have a cluster that contains objects that implement ExternalizableLite generally (and some that implement Serializable) and I would like to start to make progress on POF (currently using 3.3.1/389p10)

    I have configured our extend TCP client config initiator and Acceptor-config with the POF serializer server recommended:

    < serializer >
    > class name < com.tangosol.io.pof.ConfigurablePofContext < / class name >
    < / serializer >

    My new POF object works just fine with this Setup, however my ExternalizableLite of existing objects today fail to serialize, exception:

    Exception in thread "main" (Wrapped: error encoding) java.lang.IllegalArgumentException: unknown user type: *.
    at com.tangosol.io.pof.ConfigurablePofContext.getUserTypeIdentifier(ConfigurablePofContext.java:395)
    at com.tangosol.io.pof.ConfigurablePofContext.getUserTypeIdentifier(ConfigurablePofContext.java:384)
    at com.tangosol.coherence.component.comm.Channel.getUserTypeIdentifier(Channel.CDB:7)

    I came across "com.tangosol.io.pof.ExternalizableLitePofSerializer" which, at first glance, seems to be close to what we need. that is, it will allow our tcp proxy manage the ExternalizableLite and the PortableObject of POF. However, I am concerned about the warning of javadoc for ExternalizableLitePofSerializer:

    ======
    WARNING: This implementation does not correctly handle all possible ExternalizableLite implementations. It will be probably supported more simple ExternalizableLite implementations which read and write their properties is a similar way to a good implementation of the PortableObject interface. Incompatibilities are likely when the user types I/O binary level don't direct (or indirect) through flow DataInput and DataOutput objects passed to ExternalizableLite.readExternal (java.io.DataInput) and ExternalizableLite.writeExternal (java.io.DataOutput) methods respectively. Note that the methods of assistance on ExternalizableHelper are conscious POF and so safe to use methods, writeExternal and readExternal methods.
    ======

    Does that mean if my ExternalizableLite did something with DataInput and DataOutput directly, for example:

    Public Sub readExternal (DataInput dataInput) throws IOException {}
    x = dataInput.readDouble (); Cannot use ExternalizableHelper as it does not support double
    }

    Public Sub writeExternal (DataOutput dataOutput) throws IOException {}
    dataOutput.writeDouble (x); Cannot use ExternalizableHelper as it does not support double
    }

    It is not safe to use ExternalizableLitePofSerializer?

    What are my options? How can I configure my Proxy TCP accept objects as POF and ExternalizableLite?

    Hello

    You can use a SafeConfigurablePofContext your serializer as it was designed to handle the scenario you describe.

    It is recommended that as soon as the migration of the Externalize to POF, you move to the use of ConfigurablePofContext. Take all the advantages of performance in Pof.

    Thank you
    / Charlie

    Coherence development team

  • Why Java makes my slower system?

    A few weeks ago I was looking on Google images, and after a left click to display, I was taken on its Web site. When I tried to save the image, I was prompted to download Java. This confuses me because I assumed that it had already been installed - but no, so I downloaded it no problem. Java has changed the way some of my usual pages respond or display - some I like better... some not. The biggest difference has been the decrease in overall response time if I am offline or online. I went from having almost instant responses to a left click (whatever) to wait 10 seconds or more (usually more) for a new online page or tab to open... time sometimes. Even offline, open the folders and files used to flash immediately, but now, some take a few seconds sometimes - as they are "stuttering".

    Everything I do is filtered on Java, somehow, slowing down the system?

    Certainly, it won't hurt to try JavaRa, but I suspect it happens something else that Java doesn't have normally this effect on performance (even if a Java exploit would give...).

    I think the chances are that your problem is more over-zealous antivirus program or malicious software.
    In any case, try JavaRa and reboot and let us know how things are and we'll take it from there.
    Finally, this behavior occurs in several browsers? (What browser and version do run normally?)
  • Some Java applets do not work after the installation in silent mode, resolved in tilting head "enable Java content in the browser" - why?

    We have about 1 800 workstations with Windows 7 (32-bit and 64-bit) running different versions of JRE Java 6 update via update 7 51 32.  Most are on 6 45 update.  We would like to standardize on update of Java 7 51 (32-bit) and get everyone updated to this version for security reasons.

    For the last two weeks, we had trouble with our driver prior to installation.  What we are seeing, it of that our procedure successfully closed all open Internet Explorer Windows and processes related to Java, uninstall all older versions of JRE Java and says then successfully installed of the update of Java 7 51.  The Java Control Panel works.  We can even take Internet Explorer to check the Java Version or Java Tester - what Version of Java are you running? and confirm that the Java applets on these sites load (although the latter only works after adding the site to the list of site exceptions); However, when the testers try to access our system Kronos Workforce Central 6.3.10, used by this system Java applets do not load.

    We tried the following things, which none worked:

    • Empty the Internet Explorer browser cache and cookies.
    • Clear the local Java cache.
    • Restart the computer.
    • Reset Internet Explorer settings, including personal settings.

    Go to the Panel control Java, ranging in the Security tab, uncheck "enable Java in the browser content", the only thing that works based on apply, press OK in the pop-up window, checking the box "Enable Java in the browser content", press OK, press OK in the pop-up window and then restart Internet Explorer.  It is only after this point, all Java applets, including those used by Kronos Workforce Central 6.3.10, work.

    What I need to know, is how I can automate the reset procedure from the box "Activate Java content in the browser" after installation, or I'm something wrong or missing a step in automatic installation that is originally for this?

    We use Microsoft SCCM 2007 R3 to perform this upgrade, and everything is run on the client computer by using the SYSTEM account.  First of all, the "javaclean.ps1" PowerShell script is run, with part of the process of command line change of the strategy of running script PowerShell for Bypass.  This script handles the closure of Java-dependent applications and Java deals and uninstall older versions of Java.

    javaclean.ps1:

    #Find all Java products, excluding the automatic update that actually is uninstalled when the main installation is removed.

    write-host "If you are looking for all versions of Java installed" - ForegroundColor yellow

    [table] $javas = Get-WmiObject-query "select * from win32_Product where (name as" Java % ' or name like '% of Java (TM)' or "J2SE %") and <>the name «Java Auto Updater»»

    If ($javas.count - gt 0)

    {

    write-host "Java is already installed" - ForegroundColor yellow

    #Get all Java processes and kill them. If java is running and processes are not killed then this script will call a restart suddenly.

    [table] $processes = Get-Process-name "Java * ' #-erroraction silentlycontinue

    $processes += get-Process - name "iexplore" #-erroraction silentlycontinue

    $processes += get-Process - name "firefox" #-erroraction silentlycontinue

    $processes += get-Process - name 'chrome' #-erroraction silentlycontinue

    $processes += get-Process - name "jqs" #-erroraction silentlycontinue

    $processes += get-Process - Name "jusched" #-erroraction silentlycontinue

    $processes += get-Process - Name 'jp2launcher' #-erroraction silentlycontinue

    If ($processes. Count - gt 0)

    {

    foreach ($myprocess to $processes)

    {

    $myprocess.kill)

    }

    }

    #Loop through the Java products installed.

    {foreach ($java to $javas)

    write-host "Uninstall" $java.name - ForegroundColor yellow.

    $java. Uninstall()

    }

    }

    Once this script is complete, SCCM calls a script VBS "install.vbs" to perform the installation of Java JRE 7 day 51.

    install.vbs

    '* ********************************

    '*

    ' * Script: install JRE 7 routine

    '*

    ' * Date: 14/03/14

    ' * Author: [REDACTED]

    ' * Rev: 1.0

    ' * Notes:

    '*

    '* ********************************

    '--------------------------------

    ' / / / Common

    '--------------------------------

    Set objFSO = CreateObject ("Scripting.FileSystemObject")

    Set objWshShell = CreateObject ("WScript.Shell")

    «Get the system architecture»

    Protected colSys: Set colSys = GetObject("WinMGMTS://"). ExecQuery ("SELECT AddressWidth FROM Win32_Processor", 48)

    Dim objSys

    For each objSys in colSys

    If objSys.AddressWidth = 64 then bolIs64Bit = True

    Next

    'Get the operating system

    Dim colOS: Set colOS = GetObject("WinMGMTS://"). ExecQuery ("" Select * from Win32_OperatingSystem ", 48")

    Dim objOS

    For each COS in colOS

    If left (objOS.caption, 20) = 'Microsoft Windows 8' then

    bolIsWin8 = True

    WScript.Echo "win8.

    End If

    If left (objOS.caption, 22) = "Microsoft Windows 8.1" Then

    bolIsWin81 = True

    WScript.Echo "win81."

    End If

    Next

    ' Set 32-bit directory program files

    If bolIs64Bit = True Then

    strPFILES = "Program Files (x 86)".

    strSYSDIR = "SysWOW64".

    Else strPFILES = "Program Files."

    strSYSDIR = "System32".

    End If

    ' Set repertoire_windows

    strWIN = objWshShell.ExpandEnvironmentStrings("%windir%") "

    'Set the current directory ".

    strCurrentDir = objFSO.GetParentFolderName (Wscript.ScriptFullName)

    ' Set computer name

    strCompName = objWshShell.ExpandEnvironmentStrings("%computername%") "

    '--------------------------------

    ' / / / Main script

    '--------------------------------

    '--------------------------------

    ' / / / Installation using .msi & capture exit code

    '--------------------------------

    ' intExitCode = objWshShell.Run ("msiexec.exe i" "" & strCurrentDir & "\package.msi" "" & "TRANSFORMS =" "" & strCurrentDir & _)

    ""\transform.mst"" "ALLUSERS = 1 Reboot = ReallySuppress/SB»(, 8, True)"

    ' wscript.quit (intExitCode)

    ' * COMMANDS RUN HERE *.

    "Create the folder structure if it does not already exist

    strFullPath = 'c:\Windows\Sun\Java\Deployment' "

    "How many levels are there in the path?

    nLevel = 0

    strParentPath = strFullPath

    Do until strParentPath = «»

    strParentPath = objFSO.GetParentFolderName (strParentPath)

    nLevel = nLevel + 1

    Loop

    ILevel = 1 to nLevel

    "Path of directory to the iLevel level to understand

    strParentPath = strFullPath

    For j = 1 To nLevel - iLevel

    strParentPath = objFSO.GetParentFolderName (strParentPath)

    Next

    ' Is it exist directory? If not, create it.

    If objFSO.FolderExists (strParentPath) = False Then

    Set newFolder = objFSO.CreateFolder (strParentPath)

    End If

    Next

    "Kill process

    objWshShell.Run "taskkill /F /IM iexplore.exe", 8, True

    objWshShell.Run "taskkill /F /IM firefox.exe", 8, True

    objWshShell.Run "taskkill /F /IM chrome.exe", 8, True

    objWshShell.Run "taskkill /F /IM javaw.exe", 8, True

    objWshShell.Run "taskkill /F /IM java.exe", 8, True

    objWshShell.Run "taskkill /F /IM jqs.exe", 8, True

    objWshShell.Run "taskkill /F /IM jusched.exe", 8, True

    "Copy deployment files

    objFSO.CopyFile strCurrentDir & "\deployment.config", "c:\Windows\Sun\Java\Deployment\", True

    objFSO.CopyFile strCurrentDir & "\deployment.properties", "c:\Windows\Sun\Java\Deployment\", True

    "Disable UAC".

    ' If bolIsWin8 or bolIsWin81 = True Then

    "objWshShell.Run"reg.exe ADD HKLM/v PromptOnSecureDesktop t REG_DWORD 0 f d", 8, True"

    "objWshShell.Run"reg.exe ADD HKLM v EnableLUA /t REG_DWORD /d 0 f", 8, True"

    "objWshShell.Run"reg.exe ADD HKLM/v ConsentPromptBehaviorAdmin t REG_DWORD 0 f d", 8, True"

    "End If

    "Install application".

    intExitCode = objWshShell.Run ("msiexec.exe i" "" & strCurrentDir & "\jre1.7.0_51.msi" "IEXPLORER = 1 AUTOUPDATECHECK = 0 = 0 JU JAVAUPDATE = 0 WEB_JAVA = 1 ALLUSERS = 1 Reboot = ReallySuppress/qn", 8, True ")

    "Enable UAC".

    ' If bolIsWin8 or bolIsWin81 = True Then

    "objWshShell.Run"reg.exe ADD HKLM/v PromptOnSecureDesktop /t REG_DWORD /d 1 f", 8, True"

    "objWshShell.Run"reg.exe ADD HKLM EnableLUA /t REG_DWORD /d 1 f v", 8, True"

    "objWshShell.Run"reg.exe ADD HKLM v ConsentPromptBehaviorAdmin /t REG_DWORD /d 5 f", 8, True"

    "End If

    WScript.Quit (intExitCode)

    '--------------------------------

    ' / / / Installation via .exe on network

    '--------------------------------

    "objWshShell.Run" "" "& strCurrentDir &"\Setup.exe"" s - sms - f1 "" "& strCurrentDir & _"

    "" "\setup.iss" "-f2" "" & strWIN & "\Temp\Install-app.txt" "", 8, True

    "Need to turn off the security warning opening the file first.

    Set objEnv = objWshShell.Environment ("PROCESS")

    objEnv ("SEE_MASK_NOZONECHECKS") = 1

    ' intExitCode = objWshShell.Run ("" "& strCurrentDir &"\jre-7u45-windows-i586.exe"" /s /v "" / norestart "& _)

    ("" "TRANSFORMS =" "" & strCurrentDir & "\Tribe-jre7.mst" "", 8, True)

    ' WScript.Quit (intExitCode)

    ' * COMMANDS RUN HERE *.

    "Then turn it back on.

    objEnv.Remove ("SEE_MASK_NOZONECHECKS")

    '--------------------------------

    ' / / / Features

    '--------------------------------

    Help on this issue would be much appreciated!

    It turns out that it is actually a problem with Kronos Workforce Central.  We had the parameter 'site.java.plugin.CLSID.familyVersion' as an application set to "clsid:CAFEEFAC-0016-0000-FFFF-ABCDEFFEDCBA", which is the CLSID Java Java 6.  After update this value to "clsid:8AD9C840 - 044F-11 D 1-B3E9-00805F499D93" (the universal CLSID of Java), this problem does not occur when the automatic upgrade of Java.

    We also have good Java 6 and 7 in our environment and did during our implementation of Kronos, so I don't know why we used the Java 6 CLSID in the first place.

    Detective Conan!

  • Question about config in incubator POF

    Far as I could see the pof-config file supplied with the JAR incubator does not include the pof-default in JAR consistency. It is no longer needed or it is assumed that users will create a pof-config that includes BOTH the config files default and incubator pof?

    / Magnus

    Hi Magnus

    Your application "s POF config should include the config of coherence POF. For example, here's a model email application that includes consistency POF and common POF, as well as a new type.

    
         
              coherence-pof-config.xml
              coherence-common-pof-config.xml
              coherence-messagingpattern-pof-config.xml
    
              
                2000
                MyPayload
            
    
          
    
    

    Paul

  • Benefits of POF

    I saw the benefits of POF several times in the past.

    One of our teams is the use of large arrays of Int and asked if POF would help. I said "I'm sure it will.

    We just did a test and the answer is not "a lot".

    We save a random size of array Int 30 x 20 (ie. 600). We are int keying.

    When I add 30,000 of them the advantage of cut POF is 162 G 158 G vs. (I'm a GC first and then using JConsole to take this reading).

    I guess that's because the Java serialization is good enough to store arrays of Int (or even that with POF is turned off, it uses ExternalizableLite under the covers for arrays of Int).

    POF is also very effective to store small amendments (e.g. 1-> 256) and we are deliberately force out of that comfort zone. (choosing a range of 0-> 100 K).

    Who has to make sense to people who know these internals?

    Best, Andrew.

    ------

    public class PofSizingTest {}

    Public Shared Sub main (String [] args) throws Exception {}

    long startTime = System.currentTimeMillis ();
    int x = 20;
    int y = 30;
    int numberOfArrays = 30000;
    NamedCache namedCache = CacheFactory.getCache ("POF_TEST_DOUBLE_ARR");
    for (int n = 0; n < numberOfArrays; n ++) {}
    profiles of double [] [] = new double [y] [x];
    for (int i = 0; i < there; i ++) {}
    for (int j = 0; j < x; j ++) {}
    profiles [i] [j] = (Math.Random () * 100000);
    }
    }
    namedCache.put(n,profiles);
    }
    System.out.println ("Time taken to" + numberOfArrays + "values =" + (System.currentTimeMillis () - startTime));
    }
    }

    In this case, you store a table of double primitive, which should be about the same size for POF and Java serialization.

    Classes tend to be much smaller. Scattered structures tend to be much smaller. POF stores duplicates by using the same format of 8 bytes as Java serialization, however.

    For more information, see "The PIF - POF Binary Format" (part of the documentation of 3.5 to http://download.oracle.com/docs/cd/E14526_01/index.htm):

    http://download.Oracle.com/docs/CD/E14526_01/CoH.350/e14509/apppifpof.htm#sthref782

    Peace,

    Cameron Purdy | The Oracle coherence
    http://coherence.Oracle.com/

  • Oracle coherence in dotnet

    Hello
    I'm trying to implement consistency using coherence 3.6.1.0 dotnet.having version installed.trying to run the sample application dotnet with the addition of coherence.dll as one of the references. But I get a msg of error as

    "could not establish a connection to one of the following addresses: [MyIpaddress:Port]; Make sure that the configuration of addresses item "remote control" contains an address and a port of a TcpAcceptor running.

    Think she's looking for some port is to be tuned my local address and port. Please help me to solve it and tell me the step by step process.


    I'm going to app.config with

    <? XML version = "1.0" encoding = "utf-8"? >
    < configuration >
    < configSections >
    < section name = "coherence" type = "Tangosol.Config.CoherenceConfigHandler, consistency" / >
    < / configSections >
    < coherence >
    file://../../../resource/config/examples-coherence.XML < cache-factory-config > < / cache-factory-config >
    file://../../../resource/config/examples-extend-cache-config.XML < cache-config > < / cache-config >
    file://../../../resource/config/examples-POF-config.XML < pof-config > < / pof-config >
    < / coherence >
    < / configuration >

    * examples - coherence.xml *.

    <? XML version = "1.0"? >
    < consistency xmlns = "http://schemas.tangosol.com/coherence" >
    <>logging-config
    stderr < destination > < / destination >
    > < 5 severity level < / severity level >
    < message format > {date} & lt; {level} & gt; (thread = {thread}): {text} < / message format >
    > limit of < 8192 characters < / character limit >
    < / operational forest-config >
    < / coherence >

    * examples-extend-cache - config.xml *.

    <? XML version = "1.0"? >
    < cache-config xmlns = "http://schemas.tangosol.com/cache" >
    < cache-system-mapping >
    <>cache-mapping
    contacts > name-cache < < / cache-name >
    < scheme name > examples-remote control < / system-name >
    < / cache-mapping >
    < / cache-system-mapping >

    <>- cached patterns
    < remote-cache-system >
    < scheme name > examples-remote control < / system-name >
    < service name > ExtendTcpCacheService < / service-name >
    < initiator-config >
    <>tcp-initiator
    <>remote addresses
    > the socket address <
    localhost < address > < / address >
    < port > 8089 < / port >
    < / socket-address >
    < / remote-address >
    < / tcp-initiator >
    < serializer >
    > class name < Tangosol.IO.Pof.ConfigurablePofContext, consistency < / class name >
    < / serializer >
    < / initiator-config >
    < / remote-cache-system >
    < / cache-plans >
    < / cache-config >

    * examples-pof - config.xml *.

    <? XML version = "1.0"? >
    < config-pof xmlns = "http://schemas.tangosol.com/pof" >
    < user-type-list >
    <! - consistency POF user types - >
    < include > assembly://Coherence/Tangosol.Config/coherence-pof-config.xml < / include >
    <! - Tangosol.Examples namespace - >
    Type < user >
    < type id > 1001 < / id-type >
    > class name < Tangosol.Examples.Model.ContactId, Contacts < / class name >
    < / user type >
    Type < user >
    < type id > 1002 < / id-type >
    > class name < Tangosol.Examples.Model.Contact, Contacts < / class name >
    < / user type >
    Type < user >
    < type id > 1003 < / id-type >
    > class name < Tangosol.Examples.Model.Address, Contacts < / class name >
    < / user type >
    Type < user >
    < type id > 1004 < / id-type >
    > class name < Tangosol.Examples.Model.PhoneNumber, Contacts < / class name >
    < / user type >
    Type < user >
    < type id > 1005 < / id-type >
    > class name < Tangosol.Examples.Contacts.OfficeUpdater, Contacts < / class name >
    < / user type >
    < / user-type-list >
    < allow-interfaces > true < / allow interfaces >
    true < subclasses allow > < / subclasses allow >
    < / pof-config >

    Hello

    The consistency-java - b 411 .zip v3.4.2 is a very very old version of coherence. From your previous post, I see that you are using version 3.6.1.0 consistency .net client. You should at least try and download the zip file from Java to address 3.6 http://www.oracle.com/technetwork/middleware/coherence/downloads/coherence-archive-165749.html here or if you are not concerned, on which version you have and download the latest 3.7.1 versions of coherence .net and Java here http://www.oracle.com/technetwork/middleware/coherence/downloads/index.html

    In the C:\Program Files\Oracle\Coherence pour.NET\examples\ContactCache.Java directory is a file called start-cache - server.cmd which will start the process of single server. Before you run this you must...

  • Set the COHERENCE_HOME environment variable to the directory where you unzipped the zip file of coherence Java for. FOR EXAMPLE if you have unzipped the file into a directory called c:\dev , then there will be a directory under that called coherence so set COHERENCE_HOME = c:\dev\coherence

  • You must also set the JAVA_HOME on your PC environment variable to the location that you installed Java - usually something like C:\Program Files\Java\jdk... ... For example, if you had 1.6.0 - 25 Java installed on your PC, then you would set JAVA_HOME = C:\Program Files\Java\jdk1.6.0_25

    Once you have set these environment variables, you should be able to open a Dos window and run the script startup-cache - server.cmd. Once it is running, your customer must start and connect to this server.

    Some tips for you if you're a .net developer and new coherence and Java.

  • Buy this book http://www.packtpub.com/oracle-coherence-35/book I know it says 3.5 but it is always topical and very good
  • Work through the examples and documentation http://docs.oracle.com/cd/E24290_01/index.htm
  • Learn some Java or find someone in your team or a company who knows Java.

    JK

  • Missing PofSerializer configuration

    I am a newbie to consistency and try to get the job of POF!

    I get the following error. I realize that this has been posted before, but the solutions don't seem to help me.

    3.6 consistency

    (Wrapped: class configuration error 'com.tangosol.io.pof.ConfigurablePofContext') java.lang.IllegalStateException: PofSerializer lack of configuration (Config=/cgbu/home4/anasthan/Oracle/Middleware/coherence_3.6/lib/tokens-pof-config.xml, Id-Type = 1001, class-Name = oracle.communications.activation.ace.Token)
    at com.tangosol.coherence.component.util.Daemon.start(Daemon.CDB:52)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.Service.start(Service.CDB:7)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.start(Grid.CDB:6)
    at com.tangosol.coherence.component.util.SafeService.startService(SafeService.CDB:28)
    at com.tangosol.coherence.component.util.safeService.SafeCacheService.startService(SafeCacheService.CDB:5)
    at com.tangosol.coherence.component.util.SafeService.ensureRunningService(SafeService.CDB:27)


    I packed the class oracle.communications.activation.ace.Token, chips-pof - config.xml and coherence-cache - config.xml in the Coherence.jar


    Cache-.sh
    ================
    #! / bin/sh

    # This will start a cache server

    # Specify consistency installation directory
    COHERENCE_HOME =.

    # The JVM heap size
    MEMORY = 512 m

    If [! ${COHERENCE_HOME}/bin/cache-server.sh - f]; then
    echo "coherence.sh: must be run from the installation of coherence directory.".
    output
    FI

    If [f $JAVA_HOME/bin/java]; then
    JAVAEXEC = $JAVA_HOME/bin/java
    on the other
    Java = JAVAEXEC
    FI

    JAVA_OPTS = ""-Xms MEMORY $ MEMORY - Xmx$ ""
    CONFIG_FILE_PATH="file:///CGBU/home4/anasthan/Oracle/middleware/coherence_3.6/lib/tokens-POF-config.xml".

    $JAVAEXEC - Server - showversion $JAVA_OPTS - cp "$COHERENCE_HOME/lib/coherence.jar" com.tangosol.net.DefaultCacheServer $1



    Token.Java
    =========
    package oracle.communications.activation.ace;

    import java.io.IOException;
    import java.io.Serializable;
    import com.tangosol.io.pof.PortableObject;
    import com.tangosol.io.pof.PofReader;
    import com.tangosol.io.pof.PofWriter;
    import java.sql. *;
    to import java.util.Enumeration;

    Token/public class implements {PortableObject}

    /**
    * 1 - unassigned
    * 2 - available
    * 3 - reserved
    * 4 - missing
    */
    private int State;

    /**
    * NO-ID (s)
    */
    private String neID;

    /**
    * Number of currently active chips
    */
    private int tokensCurrentlyActive;

    /**
    * Max - number available
    */
    private int maxTokensAvailable;

    /**
    * ID token unqiue, used to identify tokens
    */
    private int tokenID;

    /**
    *
    * Index POF for data members
    */
    public static final int TOKENID = 0;
    public static final int STATE = 1;
    public static final int NEID = 2;
    public static final int CURTOKEN = 3;
    public static final int MAXTOKEN = 4;

    /**
    *
    @param State
    */
    {} public void setState (int State)
    This.State = State;
    }

    /**
    *
    * @return
    */
    public int getState() {}
    return status;
    }

    /**
    *
    @param neID
    */
    {} public void setNeID (String neID)
    this.neID = neID;
    }

    /**
    *
    * @return
    */
    public String getNeID() {}
    return neID;
    }

    /**
    *
    @param tokensCurrentlyActive
    */
    {} public void setTokensCurrentlyActive (int tokensCurrentlyActive)
    this.tokensCurrentlyActive = tokensCurrentlyActive;
    }

    /**
    *
    * @return
    */
    public int getTokensCurrentlyActive() {}
    Return tokensCurrentlyActive;
    }

    /**
    *
    @param maxTokensAvailable
    */
    {} public void setMaxTokensAvailable (int maxTokensAvailable)
    this.maxTokensAvailable = maxTokensAvailable;
    }

    /**
    *
    * @return
    */
    public int getMaxTokensAvailable() {}
    Return maxTokensAvailable;
    }

    /**
    *
    @param tokenID
    */
    {} public void setTokenID (int tokenID)
    this.tokenID = tokenID;
    }

    /**
    *
    * @return
    */
    public int getTokenID() {}
    Return tokenID;
    }

    -Interface PortableObject-

    /**
    * {@inheritDoc}
    */
    public void readExternal (PofReader readers)
    throws IOException
    {
    tokenID = Integer.parseInt (reader.readString (TOKENID));
    neID = reader.readString (NEID);
    tokensCurrentlyActive = Integer.parseInt (reader.readString (CURTOKEN));
    maxTokensAvailable = Integer.parseInt (reader.readString (MAXTOKEN));
    State = Integer.parseInt (reader.readString (STATE));
    }

    /**
    * {@inheritDoc}
    */
    public void writeExternal (writer PofWriter) methods
    throws IOException
    {
    writer.writeString (TOKENID, Integer.toString (tokenID));
    writer.writeString (NEID, neID);
    writer.writeString (CURTOKEN, Integer.toString (CURTOKEN));
    writer.writeString (MAXTOKEN, Integer.toString (MAXTOKEN));
    writer.writeString (STATE, Integer.toString (STATE));
    }
    }



    chips-pof-config. XML
    =============

    <? XML version = "1.0"? >
    < config-pof xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance".
    xmlns = "http://xmlns.oracle.com/coherence/coherence-pof-config."
    xsi: schemaLocation = "http://xmlns.oracle.com/coherence/coherence-pof-config consistency-pof - config.xsd" >

    < user-type-list >
    <! - consistency POF user types - >
    < include > coherence-pof - config.xml < / include >

    <!-com.tangosol.examples package->
    Type < user >
    < type id > 1001 < / id-type >
    > class name < oracle.communications.activation.ace.Token < / class name >
    < / user type >
    < / user-type-list >
    < allow-interfaces > true < / allow interfaces >
    true < subclasses allow > < / subclasses allow >
    < / pof-config >

    coherence-cache-config. XML
    =================
    < distributed plan >
    < scheme name > example distributed < / system-name >
    < service name > DistributedCache < / service-name >
    < serializer >
    < instance >
    > class name < com.tangosol.io.pof.ConfigurablePofContext < / class name >
    < init-params >
    < init-param >
    Type string < param > < / param-type >
    < param-value of the system = property ' tokens-pof - config.xml "> /cgbu/home4/anasthan/Oracle/Middleware/coherence_3.6/lib/tokens-pof-config.xml < / param-value >
    < / init-param >
    < / init-params >
    < / body >
    < / serializer >
    < support-map-plan >
    < local plan >
    < system-Ref > example-binary-support-map < / plan-ref >
    < / local plan >
    < / support-map-plan >
    < autostart > true < / autostart >
    < / distributed plan >


    I don't know what the problem is please help!

    Hello

    First of all, it is not recommended to load your application specific configuration and the coherence.jar classes, although it should work. Try to do the following:

    1. create a new pot and put your token class inside change your cache-.sh to include this new jar in your classpath
    2 Add a property - Dtangosol.coherence.cacheconfig = in your cache-.sh

    "" $JAVAEXEC - Server - showversion $JAVA_OPTS -Dtangosol.coherence.cacheconfig = -cp "$COHERENCE_HOME/lib/coherence.jar:++ ' com.tangosol.net.DefaultCacheServer $1

    You need not load in the classpath or use any property for pof config because its location is already mentioned in your cache configuration

    I hope this helps!

    See you soon,.
    NJ

    Published by: user738616 on October 13, 2011 08:34

Maybe you are looking for