Marshall and Serialization

Hello There:
Can any one please educate me the difference between marshaling an object and serialize an object. They looked the same to me. they both flat the object to a readable format and maintain the state of the object. What's the difference, why both terms are used. Where do I find the definition of 'marshal'? Thank you very much!
-RM

Please search the web for general questions. But we'll let you slide this time. Here's what my search turned up:
http://forum.java.sun.com/thread.jspa?threadID=616673&messageID=3436144
http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=1&t=009261
...if you want more just google:
http://www.google.com/search?q=marshalling+vs.+serialization

Similar Messages

  • Drag and Drop questions and Serialization in the 1Z0-852 Upgrade exam?

    Hi,
    Does anyone know if the drag and drop items and serialization have been removed from the 1Z0-852 Java SE 6 Programmer Certified Professional UPGRADE exam?
    I know that they have been removed from the 1Z0-851, but not sure about the upgrade exam.
    Thanks in advance,
    Alvaro

    Alvaro wrote:
    Hi,
    Does anyone know if the drag and drop items and serialization have been removed from the 1Z0-852 Java SE 6 Programmer Certified Professional UPGRADE exam?
    I know that they have been removed from the 1Z0-851, but not sure about the upgrade exam.
    Thanks in advance,
    Alvaro(1) Drag and Drop
    .... this question format will have been removed:
    Ref: http://blogs.oracle.com/certification/entry/0596
    (2) Serialization:
    It is best to compare the topics from your notes to the current topics, however according to my reading of the current topics it is in scope at least to some extent:
    http://education.oracle.com/pls/web_prod-plq-dad/db_pages.getpage?page_id=41&p_exam_id=1Z0_852 (Section 3 API Contents):
    Develop code that serializes and/or de-serializes objects using the following APIs from java.io: DataInputStream, DataOutputStream, FileInputStream, FileOutputStream, ObjectInputStream, ObjectOutputStream and Serializable.

  • Entry processor performance and serialization

    Our application invokes an entry processor from a .Net extend client. We are seeing very poor performance the first few times the processor is invoked (typically 60ms vs 2ms). I was expecting this to be due to the overhead of the initial TCP connection but this doesn't appear to be the case. Here is a typical set of timings from the beginning of invoking the EP on the client:
    5ms: Object starts being deserialized on proxy
    7ms: Deserialization is finished, and serialization begins
    9ms: Serialization is complete.
    55ms: Deserialization begins on the storage node
    58ms: Deserialization complete on storage node
    58.5: Entry processor invocation complete
    60ms: Serialization of result is complete
    My questions are:
    - What is happening between the end of serialization of the object by the proxy and deserialization starting on the storage node?
    - Given that the cache is POF enabled, why is the proxy deserializing and reserializing the entry processor?
    Version is 3.7.1.6

    Hi Rob,
    Config is below. defer-key-association-check is not set. The timings were established by logging the POF serialization in each process so its definitely the proxy that is doing it.
    Regards,
    Dave
    Client config:
    <?xml version="1.0"?>
    <cache-config xmlns="http://schemas.tangosol.com/cache">
    <caching-scheme-mapping>
    <cache-mapping>
    <cache-name>Cache</cache-name>
    <scheme-name>remote-scheme</scheme-name>
    </cache-mapping>
    </caching-scheme-mapping>
    <caching-schemes>
    <remote-cache-scheme>
    <scheme-name>remote-scheme</scheme-name>
    <service-name>ExtendProxyService</service-name>
    <initiator-config>
    <tcp-initiator>
    <remote-addresses>
    <socket-address>
    <address>localhost</address>
    <port>1234</port>
    </socket-address>
    </remote-addresses>
    <connect-timeout>5s</connect-timeout>
    </tcp-initiator>
    <outgoing-message-handler>
    <request-timeout>1s</request-timeout>
    </outgoing-message-handler>
    <serializer>
    <class-name>Tangosol.IO.Pof.ConfigurablePofContext, Coherence</class-name>
    <init-params>
    <init-param>
    <param-type>string</param-type>
    <param-value>assembly://..../pof-config.xml</param-value>
    </init-param>
    </init-params>
    </serializer>
    </initiator-config>
    </remote-cache-scheme>
    </caching-schemes>
    </cache-config>
    Server cache config:
    <?xml version="1.0"?>
    <cache-config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://xmlns.oracle.com/coherence/coherence-cache-config"
    xsi:schemaLocation="http://xmlns.oracle.com/coherence/coherence-cache-config coherence-cache-config.xsd">
    <defaults>
    <serializer>pof</serializer>
    </defaults>
    <caching-scheme-mapping>
    <cache-mapping>
    <cache-name>Cache</cache-name>
    <scheme-name>cache-distributed</scheme-name>
    </cache-mapping>
    </caching-scheme-mapping>
    <caching-schemes>
    <distributed-scheme>
    <scheme-name>cache-distributed</scheme-name>
    <service-name>PartitionedCache</service-name>
    <thread-count>10</thread-count>
    <partition-count>2039</partition-count>
    <backing-map-scheme>
    <local-scheme />
    </backing-map-scheme>
    <autostart>true</autostart>
    </distributed-scheme>
    <proxy-scheme>
    <service-name>ExtendProxyService</service-name>
    <thread-count>5</thread-count>
    <acceptor-config>
    <tcp-acceptor>
    <local-address>
    <address>localhost</address>
    <port system-property="tangosol.coherence.proxy.port"></port>
    </local-address>
    </tcp-acceptor>
    </acceptor-config>
    <proxy-config>
    <cache-service-proxy>
    <class-name>....InteceptorCacheService</class-name>
    <init-params>
    <init-param>
    <param-type>com.tangosol.net.CacheService</param-type>
    <param-value>{service}</param-value>
    </init-param>
    </init-params>
    </cache-service-proxy>
    </caching-schemes>
    </cache-config>

  • Marshall and Re-Marshall in FML32 buffer

    Hi,
    Can anyone tell me how to Marshall and Re-marshall a structure in an FML32 buffer.
    Thanks in advance
    Krishna

    You can use tusc to show you the actual msgsnd/msgrcv system calls, so
    that you can see the actual message sizes. You will also be able to see
    the file I/O, if file transfer is being used.
    Tuxedo does not write to the ULOG every time it uses file transfer, just
    when it thinks it could have sent it as a message, but that fails for
    some reason.
    Fused() will show you the amount of data that will be transmitted. Add
    an extra 360 bytes for the Tuxedo header. If you are sending to a
    different machine type, the buffer will be encoded, and be much larger.
         Scott Orshan
    Per Lindström wrote:
    Hello everyone,
    I'm currently trying to figure out how to configure the [IPC] queues and kernel
    parameters regarding MSG* for a high-volume application. As one of the steps I'm
    trying to identify the size of the input message for a certain service. I know
    it's a rather big message, but I could use some more specific information.
    Using TMTRACE I get the impression that a certain message is 95960 bytes:
    TRACE:at: { tpservice({"MY_SERVICE", 0x0, 0x401a6278, 95960, 0, -1, {0, -2, -1}})
    and there's also a call to tptypes() (checking for FML32 buffer type) that's also
    returning 95960.
    However, if this message is larger than 64K (msgmax, msgmnb), wouldn't I be getting
    the fearsome message "will try file transfer" in the ULOG?
    My question is if what TMTRACE shows is the size AFTER re-indexing of the FML32
    buffer, and, in that case, if there is any way of seeing the "transmitted size"
    (which I believe is unindexed) of the message? There are some ia trace messages
    regarding tpalloc() of rpcrqst buffers - are they of any use in this situation?
    This is running Tuxedo 6.5 on HP-UX 11.00.
    Any input on this welcome!
    Best regards,
    /Per

  • OPSM 1.2 [Oracle pedigree and Serialization manager] installation is failed

    Hi All,
    We are doing OPSM 1.2 installation on Oracle Enterprise Linux 5.6 [64-bit].
    Steps we have done:
    1. installed 11g db and created repositories for soa server.
    2. installed weblogic server 10.3.6
    3. Installed soa server & created two managed servers soa_server1 and pas_server1 in weblogic as per the doc " Oracle Pedigree and Serialization Manager Installation Guide"
    4. And created required schemas in db for OPSM.
    5. and ran $MW_ORA_HOME/common/bin/wlst.sh ./pasMasterInstall.py
    Below are The error we are getting at the time of deployment is:
    Deploying the PasSerializationManager application...
    Deploying application from /u01/ORASOA/Middleware/Oracle_SOA1/pas/applications/install/PasSerializationManager.ear to targets pas_server1 (upload=false) ...
    <Dec 19, 2013 7:56:03 AM EST> <Info> <J2EE Deployment SPI> <BEA-260121> <Initiating deploy operation for application, PasSerializationManager [archive: /u01/ORASOA/Middleware/Oracle_SOA1/pas/applications/install/PasSerializationManager.ear], to pas_server1 .>
    ....................................................................................................No stack trace available.
    This Exception occurred at Thu Dec 19 08:01:04 EST 2013.
    weblogic.management.scripting.ScriptException: Error occured while performing deploy : The action you performed timed out after 300,000 milliseconds.
    Error: Unable to deploy the Ear Files.
    Shutting down the AdminServer...
    Stopping the AdminServer...
    Finished stopping the AdminServer.
    Moving the Installed Files to the Install Directories...
    Finished moving files to install directory.
    Restoring Backup...
    Finished restoring backup.
    ERROR: Installation Failed!
    Note: Please review the above output buffer to determine what error(s)
          have occurred. You must fix any errors before attempting to
          retry the installation.
    WARNING: System failed to register the MDS Repository with WebLogic. It is likely
    that the MDS Repository has already been registered. Please verify the registered
    metadata repositories using Oracle's Enterprise Manager application. Once logged
    into Enterprise Manager, expand the Metadata Repositories node and verify an entry
    exists for mds-mds-ApplicationMDSDBDS. In addition, click on the repository and
    verify it is targeted to the appropriate servers.
    Exiting WebLogic Scripting Tool.
    <Dec 19, 2013 8:01:09 AM EST> <Warning> <JNDI> <BEA-050001> <WLContext.close() was called in a different thread than the one in which it was created.>
    In pas_server1.log file:
    Caused By: oracle.mds.exception.MDSExceptionList: MDS-01329: unable to load element "persistence-config"
    MDS-01370: MetadataStore configuration for metadata-store-usage "MAR_TargetRepos" is invalid.
    MDS-00929: unable to look up name "jdbc/mds/opsm" in JNDI context
    Unable to resolve 'jdbc.mds.opsm'. Resolved 'jdbc.mds'
            at oracle.mds.config.PConfig.loadFromBean(PConfig.java:1008)
            at oracle.mds.config.PConfig.<init>(PConfig.java:767)
            at oracle.mds.config.MDSConfig.loadFromBean(MDSConfig.java:1151)
            at oracle.mds.config.MDSConfig.loadFromElement(MDSConfig.java:1218)
            at oracle.mds.config.MDSConfig.<init>(MDSConfig.java:781)
            at oracle.mds.config.MDSConfig.<init>(MDSConfig.java:728)
            at oracle.mds.internal.lcm.deploy.DeployManager.deploy(DeployManager.java:529)
            at oracle.mds.internal.lcm.deploy.DeployManager.startDeployment(DeployManager.java:211)
            at oracle.mds.internal.lcm.MDSLifecycleListenerImpl.start(MDSLifecycleListenerImpl.java:215)
            at oracle.mds.lcm.weblogic.WLLifecycleListener.preStart(WLLifecycleListener.java:77)
            at weblogic.application.internal.flow.BaseLifecycleFlow$PreStartAction.run(BaseLifecycleFlow.java:282)
            at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
            at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
            at weblogic.application.internal.flow.BaseLifecycleFlow$LifecycleListenerAction.invoke(BaseLifecycleFlow.java:199)
            at weblogic.application.internal.flow.BaseLifecycleFlow.preStart(BaseLifecycleFlow.java:62)
            at weblogic.application.internal.flow.HeadLifecycleFlow.prepare(HeadLifecycleFlow.java:283)
            at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:648)
            at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
            at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:191)
            at weblogic.application.internal.EarDeployment.prepare(EarDeployment.java:59)
            at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:154)
            at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:60)
            at weblogic.deploy.internal.targetserver.operations.ActivateOperation.createAndPrepareContainer(ActivateOperation.java:208)
            at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:98)
            at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217)
            at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:747)
            at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1216)
            at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:250)
            at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:159)
            at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:171)
            at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:13)
            at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:46)
            at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:545)
            at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
            at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
    Any one please  provide resolution to fix the issue. 
    Thanks
    skjb     

    Have you searched MOS website for (MDS-01370 AND MDS-00929) and go through the docs?
    If none of MOS docs help, then please log a SR.
    Thanks,
    Hussein

  • Equipment Master and Serialization

    Hi,
    Can anybody give me an overview/Definition on Equpment master and serialization in SAP. Where do we need them exactly and why? how does it relates to SD?
    Your early response will be highly appreciated.
    Thanks

    Hi Muhammad,
    Please check this links.
    http://help.sap.com/saphelp_erp2005/helpdata/en/01/d544ef4ab311d189740000e8322d00/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/dd/560d93545a11d1a7020000e829fd11/frameset.htm
    Hope this will help.
    Regards,
    Ferry Lianto
    Please reward points if helpful.

  • Marshalling and Unmarshalling on xml

    is this the one of the way of parsing xml??

    If by "marshalling and Unmarshalling on xml" you mean converting between XML and Java, then yes, JAXB can be a viable alternative to SAX or DOM, depending on your requirements.
    It is a simpler solution if it's the binding that you actually need.
    If Java representation of XML isn't relevant and you're only concerned about firing events when a particular XML artifact is detected, then SAX would be more indicated.
    Take the good habit of listing your actual requirements before considering a range of options.

  • Comparable and Serializable interfaces

    Hi All,
    I have developed a program in java which implements Comparable and Serializable Interfaces. After, I decided to run the program in J2ME. But later on, I found that MIDP doesn't implement these interfaces.
    Some one can help me how to implement my own interfaces.
    Thank you

    Hi Supareno
    I need urgently your help.
    I developed Java program which works as predicitive text system for my mother tongue.I would like to move from Java to J2ME. But until now I have problems. please can u help me. the following code run in command line.
    I tried to develop my own interfaces as you told me but it doesn't work.
    Help me also for reading and writing text files.
    Thank you
    import java.util.*;
    import java.io.*;
    import java.util.Vector;
    import java.util.Enumeration;
    public class PredText {
    private Vector dict;
    public static final String dictionaryFile = "C:/java/words.txt";
    // convert a string to the corresponding signature
    public static String toNumeric (String word) {
    String lowerWord = word.toLowerCase();
    StringBuffer result = new StringBuffer("");
    for (int i = 0; i < lowerWord.length(); i++) {
    char c = lowerWord.charAt(i);
    if ("abc".indexOf(c) > -1) result.append("2");
    else if ("def".indexOf(c) > -1) result.append("3");
    else if ("ghi".indexOf(c) > -1) result.append("4");
    else if ("jkl".indexOf(c) > -1) result.append("5");
    else if ("mno".indexOf(c) > -1) result.append("6");
    else if ("pqrs".indexOf(c) > -1) result.append("7");
    else if ("tuv".indexOf(c) > -1) result.append("8");
    else if ("wxyz".indexOf(c) > -1) result.append("9");
    else if (" ".indexOf(c) > -1) result.append("9");
    else result.append("?");
    return result.toString();
    // find all the words corresponding to a signature
    public Vector findMatches(String sig) {
    WordSig ws = new WordSig(sig, "");
    WordSig newws;
    Vector results = new Vector();
    int index;
    index = Collections.binarySearch(dict, ws);
    if (index < 0){
    // no matches! :(
    // try to get the string that starts with a substring like ours.
    index=-1-index;
    if (((WordSig)dict.get(index)).getSig().startsWith(sig)) {
    // no word found. we return those starting with the
    // same signature
    newws = (WordSig) dict.get(index);
    results.addElement(newws.getWord().substring(0,sig.length()));
    return results;
    } else{
    //no match
    return results;
    } else {
    // go back to the first match
    while(((WordSig)dict.get(index)).getSig().equals(sig) && index>0)
    index--;
    if (index != 0)
    index++;
    while ((newws = (WordSig) dict.get(index)).equals(ws)){
    results.addElement( newws.getWord() );
    index++;
    return results;
    // intialises the dictionary
    public PredText () {
         String word;
    String sig;
    Vector dict = null;
    // first try to load dict.dat
    try {
    System.out.print("Trying to load dict.dat...");
    FileInputStream fileStream = new FileInputStream("C:/java/dict.dat");
    ObjectInputStream objectStream = new ObjectInputStream(fileStream);
    dict = (Vector) objectStream.readObject();
    fileStream.close();
    System.out.println(" done.");
    }catch (ClassNotFoundException classNotFoundException) {
         System.out.println("Unable to create an object");     
    catch (IOException e) {
    // exception: create the dictionary
    System.out.println("Error. I'm going to recreate the dictionary file");
    try {
    dict = createDict();
    catch (IOException ioe) {
    System.err.println("Error while creating dictionary file. Exiting." + e);
    System.exit(1);
    this.dict = dict;
    // create the dictionary serialised file
    public Vector createDict () throws IOException {
    String word;
    Vector dict = new Vector();
    //open the dictionary file
    System.out.print("Reading the dictionary... ");
    BufferedReader dictFile = new BufferedReader(
    new FileReader(dictionaryFile));
    //insert each word into the data structure
    while ((word = dictFile.readLine()) != null) {
    word = word.toLowerCase();
    dict.addElement(new WordSig(toNumeric(word), word));
    // List list = dict.subList(0, dict.size());
    List list = dict.subList(0, dict.size());
    Collections.sort(list);
    System.out.println("done.");
    System.out.print("Writing the dictionary... ");
    FileOutputStream fileStream = new FileOutputStream("C:/java/dict.dat");
    ObjectOutputStream objectStream = new ObjectOutputStream(fileStream);
    objectStream.writeObject(dict);
    objectStream.flush();
    fileStream.close();
    System.out.println("done.");
    return dict;
    public static void main (String args[]) {
         PredText pt = new PredText();
    if (args.length == 0) {
    // no arguments, find the largest clash
         Vector result;
         Enumeration e = pt.dict.elements();
    String currentSig = "";
    String prevSig = "";
    int clash = 0;
    int maxClash = 0;
    String clashSig = "";
    while (e.hasMoreElements()) {
    WordSig ws = (WordSig) e.nextElement();
    currentSig = ws.getSig();
    if (currentSig.equals(prevSig)) {
    // another word with the same signature
    clash ++;
    } else {
    // new signature: check if the previous one led
    // to a maximal clash
    if (clash > maxClash) {
    clashSig = prevSig;
    maxClash = clash;
    clash = 1;
    prevSig = currentSig;
    result = pt.findMatches(clashSig);
    System.out.println("The signature leading to most clashes is "
    + clashSig + " with " + result.size() +
    " number of clashes");
    for (int j = 0; j < result.size(); j++) {
    System.out.println((String)result.get(j));
    } else if ("0123456789".indexOf(args[0].charAt(0)) > -1){
    // numeric input: find the matches for the argument
    Vector result;
    result = pt.findMatches(args[0]);
    for (int j = 0; j < result.size(); j++) {
    System.out.println((String)result.get(j));
    } else {
    // convert each word to the corresponding signature
    for (int i = 0; i < args.length; i++) {
    System.out.print(toNumeric(args) + " ");
    class WordSig implements Comparable, Serializable {
    String word;
    String sig;
    public WordSig (String sig, String word) {
    this.sig = sig;
    this.word = word;
    public String getSig () {
    return this.sig;
    public String getWord() {
    return this.word;
    public int compareTo (Object ws) {
    return sig.compareTo(((WordSig) ws).getSig());
    public boolean equals (Object ws) {
    return sig.equals(((WordSig) ws).getSig());
    public String toString () {
    return sig + ", " + word;

  • Comparable and Serializable Interfaces in MIDP

    Hi All,
    I have developed a program in java which implements Comparable and Serializable Interfaces. After, I decided to run the program in J2ME. But later on, I found that MIDP doesn't implement these interfaces.
    Some one can help me how to implement my own interfaces.
    Thank you

    Thank you for replying to me.
    My problem is to compare to objects in MIDP.
    You know that in java is possible to implements directly the Comparable interface but in MIDP is not the same. So I think it requires to create your own. Is that my question.
    I need some to help me. just to avoid the implentation of comparable interface from the java lang package.
    Thank u.

  • What is serialization and serializable

    what is serialization and serializable,Can any body explain me please.

    hi
    Serialization in java is the process of making the object flat which can later be stored on your disk like a normal flat file. the serailized object can be found useful mainly when using RMI and EJB where we persist cobjects so that they can be sent online (thru cable) by this we mean for objects to be distributed the prerequiste is tht they should be serialized. For this we have a interfacein java called "Serializable". the class tht needs serialization of its object should implement this class. this is a marker interface(the interface tht contains nmo methods)
    hope the concept is clear if not please mail me to : [email protected]
    bye
    thnx and regards
    bhaskara navuluri

  • JAXB marshal and unmarshal

    hello,
    i have written some code to retrieve data from an XML file and mapped the data and display the mapped data in a new XML file, but i am able to display the mapped data in an MSdos window by running ANT, after this i am unable to write the displayed data in to XML file.
    Input XML file holds --- Firstname(Hello) and
    Lastname(World)
    my MSdos display data ----------- Hello World
    is in this way
    I want the above out put in to XML file
    if any body know this help me.
    Thank you.

    IMHO these classes are not meant to be serialised, the XML produced is the medium that is tranmitted between programs. The XMLB classes are available at both ends to do the marshalling/unmarshalling.I dissagree, xml is just an interface to the outside world, so to speak. I'm working with a project that uses jini and rmi, I really don't need the extra hasle of writting custom serialization classes.

  • Web Application and Serialization

    Hi, i have a problem with a web application that is running on an Application server (BEA WebLogic 7.0). I have only the war file of the web application and i must know if in this war there is a class that is not serializable.
    How can i find it ? Is there a tool that can help me to find not serializable classes ?
    Thanks.
    claudiozx2006

    One way to do that is to decompile Java classes with Java decompiler and see which one doesn't implement Serializable interface. Here is a link to a good decompiler: http://www.kpdus.com/jad.html

  • Jndi and serializable objects

    Hi,
    I am attempting to create a cache on the web server to store
    frequently accessed reference data. I do so by running a series of
    queries in a startup class. The data retrieved from the result set of
    each query is stored in a custom class and bound to the server context.
    My understanding is that when serializable objects are bound, they are
    written to disk (so as not.to waste valuable Heap space I assume). As a
    test I made the startup query return a large amount of data and I
    expected to see the amount of free disk space decrease as the objects
    were bound however I did not see this occurring. I examined the memory
    usage of the java process with the NT task manager, and the memory usage
    was increasing pretty dramatically as the query results were performed
    and new objects created to store this data.
    Based on these observations I assume that the objects I created and
    bound are stored in the Java Heap and not written to disk. Would
    Weblogic at some point write these to disk if memory became tight or is
    my understanding that binding an object serializes it incorrect?
    If it turns out that what I am attempting here consumes a lot of heap
    space, I assume that server performance will suffer which is
    unacceptable. Would using read-only entity beans be a better solution?
    The container could manage this memory more effectively but it would
    seem to add a lot of overhead for a simple read only data cache.
    Thanks,
    Steve Snodgrass

    We never write jndi data to the disk. So if you add more objects your are
    going to take up more heap space. You should be looking at other
    alternatives to implement this.
    -- Prasad
    Steve Snodgrass wrote:
    Hi,
    I am attempting to create a cache on the web server to store
    frequently accessed reference data. I do so by running a series of
    queries in a startup class. The data retrieved from the result set of
    each query is stored in a custom class and bound to the server context.
    My understanding is that when serializable objects are bound, they are
    written to disk (so as not.to waste valuable Heap space I assume). As a
    test I made the startup query return a large amount of data and I
    expected to see the amount of free disk space decrease as the objects
    were bound however I did not see this occurring. I examined the memory
    usage of the java process with the NT task manager, and the memory usage
    was increasing pretty dramatically as the query results were performed
    and new objects created to store this data.
    Based on these observations I assume that the objects I created and
    bound are stored in the Java Heap and not written to disk. Would
    Weblogic at some point write these to disk if memory became tight or is
    my understanding that binding an object serializes it incorrect?
    If it turns out that what I am attempting here consumes a lot of heap
    space, I assume that server performance will suffer which is
    unacceptable. Would using read-only entity beans be a better solution?
    The container could manage this memory more effectively but it would
    seem to add a lot of overhead for a simple read only data cache.
    Thanks,
    Steve Snodgrass

  • Drag and drop, transferable and serializable

    I am currently writing a drag and drop algorithm for a JTree.
    I mostly follow the example at http://www.oreilly.com/catalog/jswing/chapter/dnd.beta.pdf
    now i encountered the following problem:
    If my Nodes are not serializable they are changed to null when a path containing them is returned via the getTransferData method as defined in the Transferable interface.
    If they implement Serializable I get a java.io.NotSerializableException:
    pointing at a class that has nothing to do with this whole operation other then being in the same package. If i also try to make this class serializeable i get java.io.NotSerializableException: that points to java.lang.ref.WeakReference (there are WeakReferences in the second class but they are totally independent to anything i try to drag and drop).
    Does anyone have any knowledge in that field?

    Had the same problems until we made the objects Cloneable also - adding a public Object clone() method to the class being Transferable-ized, making sure it obeyed clone() semantics, and we started getting the right data flavors.

  • Interface/class hierarchy and serialization?

    Hi,
    I have an interface, base class that implements this interface and subclasses derived from base class that also implement this interface.
    I also have a method with this interface as an argument. My question is: how to do serialization of this argument in this method without using instanceof operator? Should interface extend Serializable and/or each class/subclass implement Serializable? Is it sufficient to just have common interface extend Serializable without classes/subclasses implementing it?
    thanks,
    sale

    How should I serialize for example if the argument in the method is subclass XYZ? Do I need to use instanceof operator?

Maybe you are looking for

  • I am in report 1 i want to execute report2 in background .

    Hi, I am in report program 1 i want to execute the report program2 in backgound and iam passing some selection screen parameters . user should not know about the running of this program2. i tried using submiit but iam seeing the result of report 2 in

  • Building an array of movie clips

    Hi I have a main document class and an array class (amongst others). I am not sure how to build the array though. Below is my attempt up to now. But I get the following error code. TypeError: Error #1009: Cannot access a property or method of a null

  • Fix a data value in a field (to be by default)

    Dear all, Does anyone knows how can I fix a data value in a field, i.e, to be by default when I first execute a transaction? Another thing, in version ECC 6.0, can I export a excel document directly without using the option "save as"? My user just wa

  • How to parse xml file in midlet

    Hi Guys, i wish to parse xml file and display it in my midlet. i found api's supporting xml parsing in j2se ie., in java.net or j2se 5.0. Can u please help me what package to use in midlet? how to parse xml info and display in midlet? Plz reply soon.

  • Objects Shifting in File after opening saved document

    Hi, I'm having a problem with illustrator where I save a file, close it, and when i reopen it, my objects have shifted off the page in either directions. How do I stop it from doing that? I need help as soon as possible since I'm working in a print s