JAVA OLYMPUS.com


aa Contact Us aa Home aa About Us aa Sign Up aa Free Java Books aa Java Books




JAVA SERIALIZATION

   
JAVA 2
Subcategories

JAVA LANGUAGE
   Getting Started
   Java Fundamentals

J2SE
   Annotations
   Applets
   Auto Boxing
   AWT
   Beans
   Collections
   Ennumerated Types
   Exceptions
   Garbage Collection
   Generics
   Immutable Types
   Internationalization
   JNI
   JVM
   I/O
   Logging
   Preference
   Reflection
   Serialization
   RunTime (JRE)
   Threads
  Database Access
   JDBC
   SQLJ
   JDO
  JFC
   J2D
   Drag & Drop
   Swing
  Media
   J2D
   J3D
   JAI
   JMF
   JTAPI
   IMAGE I/O
   SDT
   Sound (JSAPI)
   Speech
  Networking
   CORBA
   JNDI
   IDL
   RMI/IIOP
   Sockets
  Security
   JAAS
   JCE
   JSSE

JINI
   Spaces

OTHER
   Java Agents
   Java Performance
   Java Design
   AOP
   Java Certification


JAVA NETWORK
   JavaOlympus
   J2EEOlympus
   JSPOlympus
   J2meOlympus





Java Object Serialization Early in the history of object oriented languages, developers ran into the need to make their objects persistent. The absolute definition of this is a little vague due to the way technologies have matured, but in general it means that an object’s life cycle is not restricted to the program or session that created it.
Measuring Serialized Objects Serialized objects is one of those magical features of Java that can make communication between systems easy. Instead of building a text representation of data, you simply send the object that contains the data to the other system.
Exploring Apache's serialization APIs Early in the history of object oriented languages, developers ran into the need to make their objects persistent. The absolute definition of this is a little vague due to the way technologies have matured, but in general it means that an object’s life cycle is not restricted to the program or session that created it.
Impact of Object Serialization and Local Enterprise JavaBeans™ on Application Server Performance The objective of this paper is to help software architects and designers make informed choices when implementing remote objects. The paper explains the Java™ serialization process, related research, and the cost of serialization and deserialization of Java objects within WebSphere® Application Server, Version 5.0 environments.
Improving HttpSession Performance with Smart Serialization One of the most persistent problems in developing Web applications in Java is how to best handle session state. This best practice discusses using transient variables to enable WebSphere® to selectively serialize objects, thus improving performance.
Long-term persistence The ability to save the JavaBean component state for long-term persistence within an XML document has been a topic of much discussion with Java developers in the past few years. This feature has finally been adopted in the 1.4 version of J2SE. In this installment of Magic with Merlin, John Zukowski shows you how to use the new XMLEncoder and XMLDecoder classes, bypassing serialization and allowing you to generate fully initialized bean instances.
An introduction to object prevalence Persisting state and data has always been a problem with object-oriented software. Over the years, developers have stored object data in many ways, including relational databases, flat files,and XML. None of these approaches really managed to keep the software purely object-oriented. The Prevayler team is changing this with the object prevalence concept. This article introduces object prevalence.
Persistence If RAM were unlimited and computers never shut down, you would now have all of the tools you need to finish the server side of the banking application. You cannnot, however, afford to have all your data in memory all of the time; computers shut down far too often, sometimes by design, sometimes by error. You need to grant your business objects a certain level of immortality, to make them persist beyond the lifecycle of the process in which they are created.
Java RMI: Serialization Serialization is the process of converting a set of object instances that contain references to each other into a linear stream of bytes, which can then be sent through a socket, stored to a file, or simply manipulated as a stream of data. Serialization is the mechanism used by RMI to pass objects between JVMs, either as arguments in a method invocation from a client to a server or as return values from a method invocation.
The Final Word On the final Keyword Some features of the Java language simply cannot be ignored. Consider for example interfaces, used extensively by every Java specification; or try/catch blocks, that form the basis for exception handling. Other features are more obscure – useful, but ignored by the masses. Without looking as far as volatile (probably the most obscure Java keyword), think about final. When was the last time you used final in your code?
Bean Persistence A Bean persists by having its properties, fields, and state information saved and restored to and from storage. The mechanism that makes persistence possible is called serialization. When a Bean instance is serialized, it is converted into a data stream and written to storage. Any applet, application, or tool that uses that Bean can then "reconstitute" it by deserialization. JavaBeans uses the JDK's object serialization API for its serialization needs.
Discover the secrets of the Java Serialization API We all know the Java platform allows us to create reusable objects in memory. However, all of those objects exist only as long as the Java virtual machine1 remains running. It would be nice if the objects we create could exist beyond the lifetime of the virtual machine, wouldn't it? Well, with object serialization, you can flatten your objects and reuse them in powerful ways.
Object Serialization Two streams in java.io-- ObjectInputStream and ObjectOutputStream-- are run-of-the-mill byte streams and work like the other input and output streams. However, they are special in that they can read and write objects.
Providing Object Serialization for Your Classes An object is serializable only if its class implements the Serializable interface. Thus, if you want to serialize the instances of one of your classes, the class must implement the Serializable interface. The good news is that Serializable is an empty interface. That is, it doesn't contain any method declarations; its purpose is simply to identify classes whose objects are serializable.
Serializing Objects Reconstructing an object from a stream requires that the object first be written to a stream. So let's start there.
Java Serialization This article discusses and demonstrates how to incorporate object persistence into a Java application using the serialization mechanism in Java 1.1. This article assumes a general familiarity with Java. The code in this article was developed using the Apple Macintosh Runtime for Java (MRJ) version 2.0 and the MRJ SDK.
Java serialization and .NET? Quiz: What do you think? Java has a binary serialization format. .NET has J#, which includes the JDK 1.1.4 class libraries, which includes Java serialization. Will it be possible for a Java app running under JDK 1.4 to serialize an object graph to a stream, and then de-serialize that object graph in .NET? We are not talking about angle brackets here, it would be binary serialization.
Rendering cells in Swing's JTable component The book Professional Java Programming covers a variety of advanced Java topics, such as the Java 2 security model, internationalization, performance tuning and memory management, printing, help, drag-and-drop operations, and cut-and-paste operations. It also contains chapters on JTree and JTable, two of the more complex components provided with Swing.
Implement Persistent Objects with Java Serialization One of the most critical operations an application can perform is saving and restoring its state between successive runs. Yet, saving data in a textual format is not always practical--or secure. Using serialization, you can save any Java object to disk in a flash.
Java Serialization to XML Java Serialization to XML (JSX) translates between Java and XML, making it possible to search, test, profile, and audit your object data with ordinary XML and text processing tools. Your data can be migrated to new application versions, to C++, and to other applications by transforming the XML. Unlike other Java XML serializers, JSX is accurate for all objects.
Accelerating Java Serialization/Deserialization But after running a comparative benchmark with Javolution XML facility. I had to change my mind!
HOWTO: Use Java Serialization with VARIANT SafeArrays VARIANT SafeArrays are used in COM to hold Arrays of data (bytes, ints, etc). It may be useful for a Java developer to use a SafeArray to persist a Java object. In order to do so, we need a way to convert the data from ObjectOutputStream to a SafeArray and back again.
Java Serialization In lessons 5 and 6 of this series you've learned how to use some of the Java streams to read or write bytes, characters or numeric data. This lesson is about reading or writing entire Java objects into streams
XML and Java: Serialization APIs Object Serialization supports the encoding of objects, and the objects reachable from them, into a stream of bytes; and it supports the complementary reconstruction of the object graph from the stream. Serialization is used for lightweight persistence and for communication via sockets or Remote Method Invocation (RMI
Into the mist of serialization myths I have heard this performance "tip" from several colleagues and keep running across it in various Java forums. In this Java Q&A installment, we discover that it is mostly an urban legend.
Flatten your objects : The Java Serialization API is used by many other Java APIs (like RMI and JavaBeans) to persist objects beyond the duration of a running virtual machine. You can also use the Java Serialization API manually for your own persistence strategies. Though the basics of Java Serialization are quite simple, some of the more intricate portions of the API can often seem a mystery. In this article, Todd Greanier will demystify the secrets of the Java Serialization API.
Do it the "Nescafé" way -- with freeze-dried JavaBeans Making software components mobile is a crucial part of any software component technology, and JavaBeans component technology is no exception. The ability to "freeze-dry" and then "reconstitute" software components (such as JavaBeans) adds a great deal of flexibility and power to the system architect's toolbox. This month we'll discuss some of the reasons for making software objects persistent, and we'll create our first persistent JavaBeans.
Serialization and the JavaBeans Specification Last month we talked about how and why to "freeze-dry" JavaBeans by serializing them. The JavaBeans Specification gives you all the serialization control you need for your application. This month, we'll look at serializing whole structures of related objects, we'll check out an interface that gives you complete control of serialization format, and we'll discuss ways of preventing serialization when necessary.
Serialization grab bag The past three JavaBeans columns on object persistence and serialization have inspired some interesting questions from readers. This month we'll answer a few of those questions, with a detailed exploration of JavaBeans serialization.
Accelerate your RMI programming Beginning with JDK 1.1, serialization and Remote Method Invocation (RMI) were added to the Java platform. While serialization and RMI are easier to use than alternate technologies, RMI usually runs slower than equivalent CORBA or remote procedure call (RPC) solutions. Fortunately, RMI was designed so that you could apply hand optimizations to gain more speed. This article shows several of those optimizations, including one that reduces serialization overhead with Java's externalization mechanism.
Factory methods can return a subtype of their return type - in particular, can return an object whose implementation class is unknown to the caller; this is a very valuable and widely used feature in many frameworks which use interfaces as the return type of static factory
Data access objects can return a subtype of their return type - in particular, can return an object whose implementation class is unknown to the caller; this is a very valuable and widely used feature in many frameworks which use interfaces as the return type of static factory
Value Objects The term Value Object is an informal term, with no widely accepted definition. Here, Value Objects (VOs) refer to data-centric classes which encapsulate closely related items.