Indirection/Serialization question

Hello,
I have the web tier and session bean tier on two different jvms. I am sending over toplink pojos from the session bean to web tier. All my pojos have a writeObject(ObjectOutputStream out) method wherein the dependent objects are instantiated prior to serialization by invoking the size() method. This works fine on the web tier and parent objects as well as the dependents are instantiated properly with the appropriate values. However when we do the calls within the same EJB we get a message saying IndirectList not instiated. When I say the calls within the same EJB I mean say one method of one bean calls another method of the same EJB. If its a remote call the indirect list is instantiated but if its same the same bean we get the above message. Can somebody tell us what we are doing wrong ?
Regards,
Aswin.

Seems odd. Are your SessionBeans using local or remote interfaces locally?
It may be that your application server is somehow optimizing the local calls, what application server are you using?
Could you include the exception and stack trace?

Similar Messages

  • File Serializable question

    hi,
    i know i've seen plenty of posts asking how to transfer files, my question is why doesn't simplying sending a file object from the client to the server work, file just implement Serializable? is it because the contents don't travel with the object? i'm pretty sure the object will go across, via socket programming or rmi, but why not the contents, or will they?
    Thank you.

    Because the file object, to the best of my knowledge,
    does not hold the contents, it just contains
    information about the file, such as its path.Very true. I never thought about it in this depth before, but the [url http://java.sun.com/j2se/1.4.1/docs/api/java/io/File.html]API says:
    "An abstract representation of file and directory pathnames."
    That's all it is, a representation, not an actualy file.
    Cheers,
    Radish21

  • Serialization question: can't write an object

    this may be a simple question but I do need to find out what's wrong with the object I am trying to serialize:
    The method (included) I use to write object works fine for some simple objects but stops without giving any message for some complex objects. It stops at "out.writeObject(obj)". Is there any other exceptions need to be caught or something else. Thanks a lot.
    public void writeAnObject(Object obj) {
    ObjectOutputStream out = null;
    try {
    out = new ObjectOutputStream(new FileOutputStream("obj.saved"));
    out.writeObject(obj);
    out.close();
    } catch (FileNotFoundException e) {
    System.err.println("Caught FileNotFoundException");
    e.printStackTrace(System.err);
    } catch (IOException e) {
    System.err.println("Caught IOException ");
    e.printStackTrace(System.err);

    Ok, one last thing... don't know if it will make any differance but why not?! This is a class that I used successfully in several projects when serializising Collections to file:
    * @author Andrew
    * @version 1.0 (2000-11-24)
    public class PersistentStorage {
         // The objectoutputstream
         private ObjectOutputStream out;
         // The objectinputstream
         private ObjectInputStream in;
          * This method saves a collection persistent to specified file.
          * @param obj          The collection we want to save.
         public void saveCollection(Collection obj, String fileName)
              throws FileNotFoundException, IOException {
              // Create a objectoutputstream
              out = new ObjectOutputStream(new FileOutputStream(fileName));
              // Write the collection object to file
              out.writeObject(obj);
              // Close the objectoutputstream
              out.close();
          * This method read a collection object from specified file.
          * @return collection          The collection we have read.
         public Collection readCollection(String fileName)
              throws FileNotFoundException, IOException, ClassNotFoundException {
              // Create a objectinputstream
              in = new ObjectInputStream(new FileInputStream(fileName));
              // Asign the read object to a Collection "container"
              Collection collection = (Collection) in.readObject();
              // Close the objectinputstream
              in.close();
              return collection;
    }The differens is that I don't catch any exceptions in those method writing and reading objects. Only throw exceptions.
    Try it out and see if it helps... (last shot) ;)
    /Andrew

  • Creative suite Standard CS 5.5 Serialization question

    Hi Everyone,
    I've got the following license :
    Adobe Design Std CS5.5 5.5 MLP Upgrade License IE FROM CS4 (65122148)
    Is it possible to serialize single application with the Adobe Provisioning Toolkit Enterprise Edition?
    Because when i try to serialize Photoshop CS5.5 i get an error code 3
    adobe_prtk.exe --tool=ReplaceSN --serialize=Photoshop-CS5.5-Win-GM --serial=xxxx
    When i use :
    adobe_prtk.exe --tool=ReplaceSN --serialize=DesignSuiteStandard-CS5.5-Win-GM --serial=xxxx
    it does work.
    Tia. Grz, Gianni

    if that's a mac warning about an unrecognized publisher, OS X Mountain Lion: The app is from an unidentified developer

  • Simple serialization question with objects

    Hi, I'm really new to the whole concept of serialization and what I want to do is create a blackjack game that can have up to 4 people playing, connected to a server that will act as the dealer. I need to be able to serialize some objects from the players to the server and have the server make some changes then send the objects back.
    However every example I've run across dealing with something of this nature involves writing to a file so I'm not sure what the code to do this would look like.
    My best guess would be ObjectInputStream and ObjectOutputStream but I don't understand how I can tell these streams that I just want to send the serialized object back and forth.
    If anyone could explain to me a bit better how these streams work, or show me roughly what the code might look like, I would really appreciate it.

    It doesn't matter whether you write to a file or a socket or a byte array or whatever. That stuff is what's under the ObjectOutputStream. When you create the OOS, you wrap it around some other stream (e.g. a FileOutputStream in the examples you're talking about I guess). To send something to a server, you'd instead just wrap it around the OutputStream of a Socket that's talking to that server. Everything else is the same.
    Whether you use raw sockets or some other means is up to you, but that's completely separate from the serialize/deserialize process.
    http://java.sun.com/docs/books/tutorial/essential/io/index.html
    http://java.sun.com/docs/books/tutorial/networking/sockets/index.html

  • Bean, Serialization Question

    Who can give me a good explanation of JavaBean. Or a good URL with examples.
    What are the advatages of java beans, how ca I write one.
    And what has it to do with Serialization.
    Serialization where is it used? Examples.

    There's nothing special about a JavaBean. In broad terms a JavaBean is simply a Java class that has been written using a particular style.
    The most notable points are:
    1) default constructor - ie, a constructor with no arguments
    2) property accessors - eg, public String getName(), public void setName(String name), public boolean isEnabled()
    The advantage is that you don't need to know about a JavaBean to use it - the methods indicate the various properties available and their data type. So Java can use Reflection to examine the bean and use it appropriately. In other words, you can find out and use the methods an Object has without knowing about its class in advance simply by examining their names.
    A good example would be a visual component (like a button). By following the JavaBean conventions you end up with a class that can be distributed to other people and they can just plug it into their applications. Think of how a visual GUI editor gives you a property window for a component - this is simply exposing the information it derives by looking at the bean's method signatures.
    There are other things that add extra value to JavaBeans like bean info classes and editor components but that's usually just confusing until you understand beans and their power.
    Have a look at http://java.sun.com/products/javabeans (I think)
    Serialisation is a somewhat different matter. This basically involves "saving an object". You can get a single instance of a class to be written to (eg) the filesystem and then load it again later. Obviously you can write your own methods for saving an object's state but serialisation is automatic and standard allowing it to be employed by other applications without knowledge of the objects that they're dealing with. Again, as with something like JavaBeans it enables you to represent the state without knowing about how the bean works. For example, a distributed application might serialise an object to transmit it between client and server. Note that serialisation does not require that the class being serialised follows the JavaBeans conventions, though - it's kind of a Java no-brainer if you like.
    It would take a long time to explain the full benefits of JavaBeans and serialisation, however.
    Hope this helps.

  • Object Serialization Question.

    Hello, I'm working on a MUD client and I have a DataHolder class to store settings. I'm having problems getting the serialization process to work properly, could someone please give me an example of how to serialize this class and then restore it again? I would like to save the class as "prefs.ser" Here is an example class to use:
    import java.awt.*;
    import java.net.*;
    import java.io.*;
    public class DataHolder
         public Color foreground = Color.black;
         public Color background = Color.yellow;
    // i dont want to save the socket info since it will change many times during actual operation
    // also i know you have to catch the exception from the socket creation : )
         public transient Socket socket = new Socket("lordsoftherealm.org", 1234);
         public DataHolder()
         public setColors(Color foreground, Color background)
              // set background and foreground colors
              // the actual class include methods to retrieve colors, sockets, and other relevent data
              this.foreground = foreground;
              this.background = background;
         public Socket getSocket()
              return socket;
    }Thank you for your time in helping me,
    Joeyford1

    Try this,
    I am using this method to serializeand deserialize my objects ..
    import java.util.Date;
    import java.math.BigDecimal;
    import java.io.*;
    * This object compliments MyObjectTranslator and provides a method to translate
    * any object into a type the database engine can process.
    public class MyObjectTranslator {
    public static Object translate(Object ob) {
    if (ob == null ||
    ob instanceof NullObject ||
    ob instanceof String ||
    ob instanceof BigDecimal ||
    ob instanceof Date ||
    ob instanceof ByteLongObject ||
    ob instanceof Boolean) {
    return ob;
    else if (ob instanceof Serializable) {
    return serialize(ob);
    else {
    // System.out.println("Ob is: (" + ob.getClass() + ") " + ob);
    System.out.println("Unable to translate object. " +
    "It is not a primitive type or serializable.");
    * Serializes the Java object to a ByteLongObject.
    public static ByteLongObject serialize(Object ob) {
    try {
    ByteArrayOutputStream bout = new ByteArrayOutputStream();
    ObjectOutputStream ob_out = new ObjectOutputStream(bout);
    ob_out.writeObject(ob);
    ob_out.close();
    return new ByteLongObject(bout.toByteArray());
    catch (IOException e) {
    System.out.println("Serialization error: " + e.getMessage());
    * Deserializes a ByteLongObject to a Java object.
    public static Object deserialize(ByteLongObject blob) {
    if (blob == null) {
    return null;
    else {
    try {
    ByteArrayInputStream bin =
    new ByteArrayInputStream(blob.getByteArray());
    ObjectInputStream ob_in = new ObjectInputStream(bin);
    Object ob = ob_in.readObject();
    ob_in.close();
    return ob;
    catch (ClassNotFoundException e) {
    System.out.println("Class not found: " + e.getMessage());
    catch (IOException e) {
    System.out.println("De-serialization error: " + e.getMessage());
    so if you want it to translate it use it something like :
    private Object translateObjectType(Object ob) {
    return MyObjectTranslator.translate(ob);
    and when you wana retrive it use it like :
    Object ds = MyObjectTranslator .deserialize((ByteLongObject) ob);

  • BlazeDS serialization question

    I recently came into a situation when sending a nested object from Java to Flex via a HashMap the Objects were null. More precisely:
    final Map<Integer, List<String>> tempMap = new HashMap<Integer, List<String>>();
    would send the keys as integers but the values were all null.
    But when sending the same with String keys:
    final Map<String, List<String>> tempMap = new HashMap<String, List<String>>();
    the objects came thru.
    Are there any restrictions in BlazeDS serialization when using complex types as keys?

    Just in case anyone is still looking for an answer to this issue, I just ran into the same problem.  During my investigation, I learned that BlazeDS serialization is expecting only String key values for Map objects.   Since the Map coming in has Integer keys, the key is changed to a string by the serialization.  At that point, the value cannot be obtained and serialized.  Change the Integer key to a String and it works.  Here is the site that helped me get it working.
    http://agricola-online.blogspot.com/2010/01/hibernate-blazeds-java-5-enum-and-flex.html

  • USB vs FIREWIRE vs ESata II RAID indirect FCP question

    Question: I have been posed with a question from my purchaser... Why doesn't USB transfer my video files faster than Firewire (when USB is rated at 480Mbs and Firewire 400 at, well, 400Mbs) and I already know that firewire drives all "linked" spend too much time talking to each other, so the SATA drive is faster...
    Anyway, can anyone tell me exactly why outputting via USB is not faster? I read something on former posts about "short bursts"...but I'm trying to keep this guy from buying cheap maxtor USB drives...and let me build the eSata that I know will work faster with my FCP files
    Thanks
    MW

    Hi Mark,
    This is common question. Check out this site, I think it explains the difference between Firewire and USB quite nicely. http://www.usb-ware.com/firewire-vs-usb.htm
    Basically, Firewire flows better and is constant, USB is not. So if you're going to do any capturing to the HDD's you're going to want Firewire.

  • Serialization question

    I have written a serializer to convert Java objects into XML documents. In order to allow circular references and to ensure that previously serialized objects do not have to be re-serialized I have implemented an object id tag. The object id tag was based on the objects hashcode. Unfortunately, this causes problems with hashtables as the entrySet field in Hashtable returns the same hash code as the hashtable itself. Also, the hashcode is implementation specific to the VM and the specification does not guarantee that two different objects will return different hashcodes.. Any ideas on how to get a true Object id that is unique to the object? How does java serialization achieve this? Thanks in advance.

    How to get an Object i.d. that is unique to the object? Just an ordinary reference to the object will do:
    Object obj = whatever();
    It may be true that different objects can return identical hashcodes, but when you look up an Object in a hashtable it should only return that object, not any old object that happens to have the same hashcode.

  • Serializable question

    I am trying to learn the concept of serializable in Java.
    I tried few tutorials and searched google, however i am
    still not cleared about it.
    Maybe my english is bad.
    what is the use of serializable? in simple english please

    Serialization is a way of writing an Object in to a byte stream. Seriazable object means an object of a class that implements the java.io.Seriazable interface. If an object is serializable it canbe written in to a stream through an java.io.ObjectOutputStream.
    This is usefull if you want to save the data of an object in to a file and read them later. Also very usefull if you want to send objects of one application to another through sockets (Network programming)
    Here is an small example
    //serializable class
    public class MySerializable implements Serializable{
       String data;
       public MySerializable(String data){
          this.data = data;
       public String toString(){
          return data;
    //writing to a file
    MySerializable obj = new MySerializable ("We gonna write this to a file");
    ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream("filename.ext"));
    oos.writeObject(obj);
    oos.close();
    //Reading
    ObjectInputStream ois = new ObjectInputStream(new FileInputStream("filename.ext"));
    MySerializable obj = (MySerializable)ois.readObject();
    ois.close();
    System.out.println(obj);Note: This is just the basics. Serialization is a large piece of java

  • Web service serialization question

    Hi,
    Sorry if this is the wrong place to post this... if so, can you pls. point me to the right place. I'm a newbie to this ng (and weblogic in general).
    I am developing a web services client using Weblogic 8.1 sp2. I have run clientgen on the WSDL and compiled my client code with the proxy jar. The web service takes in a complex object as argument. I populate the object & invoke the service. The SOAP request seems to miss out a few important elements even though I have properly populated them in the object. This seems to be arbitrary, because the element is being populated in one request, but missing in the other, even though the code is EXACTLY the same.
    I'm trawled the web, but no one seems to have faced anything like this. I can post the WSDL & the soap requests if required.
    Regards,
    Mridul.

    Hi,
    the clientgen tool is somewhat buggy, have you tried the SP4 version ?
    If this does not work, please post more details.
    - Anders M.

  • Image serializable question

    i want to send image to another server'database,and can get it later.
    how to transport image on net, who can paste some code?
    thanks !

    Here was a discussion, and it also points to other related threads:
    http://forum.java.sun.com/thread.jsp?forum=31&thread=411943
    Mike

  • SAP ISU BP Contact - CRM Activity - CRM IC Interaction record

    Hi   All -
    I have a cookbook which talks about migrating SAP ISU BP Contacts into CRM Activity.
    Now, my question is if I do this, will this show up as a interaction record against the customer in the IC WebClient in CRM?
    We are considering a design where billing supervisors will enter a BP Contact in ISU when customers directly call them about a bill.  Later, if this customer calls the Cust Service Rep, we want this interaction to be visible to the CSR who will only use the CRM Webclient.
    So, I guess indirectly my question is,
    "Is a CRM Activity the same as an CRM WebClient Interaction record"?
    or
    "Is a CRM WebClient Interaction record a type of CRM Activity"?
    Thanks in advance for taking your time to answer this.
    Regards,
    Pradhip.S

    Hello Pradhip,
    the CRM IC Interaction Record is technically a CRM Activity with a certain transaction type. You can configure the replication of IS-U Contacts that the created activity is shown in the Interaction Center as Interaction Record. So you will be able to see the IS-U Contacts created in ERP - for example within a Front Office Process - in CRM as replicated Interaction Records.
    Kind regards,
    Christian

  • Connected clips cannot have transitions error....what is it ?

    I'm trying to break apart a compound clip and it is giving me an error......' The selected item contains at least one transition , if you click break apart , the transitions will be removed from the resulting connected clips .......
    all compound clips have transitions ...big deal....what does this mean then??

    We all are unknown to each other,many don't even have real names....this arguement can go on and on without any responsibility of decorum ....I will in future try to find answers to questions on other forums before coming here,
    it's just a kind point of view that everybody who is thinking that I'm asking questions just to have fun and not searching is wrong because I do that..15-20 questions till now cannot teach you FCPx where I have completed an entire project with fx, titles and music..infact I always type the question first on google...
    Secondly this episode has taught me a very big lesson ...that modesty is the most stupid trait....till my last post I was having long discussions with the best people on this forum and the way they were discussing things with me there were times when they realized that certain things were new problems , certain problems couldn't even be solved ....as nobody had an answer to it....but all this started after my modest reply of saying 'I don't know anything' before which there were 16 and 11 replies to my posts and some guys have gone out of the way to find work arounds for me .....so infact you are abusing their participation in my posts by saying that my questions were lazy questions, I posted a question with the least number of words only when I felt every search in google comes in the form of a long indirect confused question and nobody has written a smaller to the point problem....now no matter if you think I shouldn't have done that but I know lakhs of people will at once get to the exact problem...Thanks for your help.I have seen the posts of you all and seen there are several points that have been raised which I started learning fcpx with and can help those genius people.....I will keep in mind what you said and take extra initiative to find out everything from elsewhere before shattering egos here.But for your help in am better informed than before so thanks.Just one request if you don't want plz don't answer to my questions but STOP insulting people who were were a part of those lazy questions why are you pulling everybody forcefully in your boat ?.It is funny that that the interest which a particlar group had in a problem is contineously being tagged as generosity and kindness of helpless,employed , forced , bound social service guys....it is not so ...they answered because the question excited them...don't glorify your prejudice by firing guns from their shoulders..they can take care of themselves,don't make gangs here, talk alone if you have a point.....thankyou.

Maybe you are looking for

  • Why won't my time capsule show up when I scan for a wireless network when I plug in the ethernet cable from my comcast modem?

    I just setup my cable and internet at my new place yesterday thru comcast.  The internet works when it is plugged directly from my modem to my iMac but when I try to plug the modem up to my time capsule to set up wireless and go through air port util

  • Need help in installing the SAP Jco

    Hi All, I'm installing HP Change Impact analysis on Quality center and bring SAP in Sync later.One of the installtion step isto install the SAP JCo(Java connector ).I have installed the SAP Jco and on starting the CIT Server..I get a exception messsa

  • Problem in Connecting to PC Suite

    Phone - Nokia 6275 CDMA Cable - Nokia CA-53 PC Suite - 6.83 PC OS - Win XP SP2 While trying to connect my phone to PC Suite through data cable, I get a USB device installation error message saying: "Service or service name already exists. USB device

  • My Blackberry not being recognise and not turning-on

    I was waiting for operator assistant to activate my T-mobile sim that accidentaly delete or call window. After that happen, I'm still hearing the computer generated voice call that I was waiting and release the battery to restart... unfortunately now

  • Why simple scrept takes time to run.....

    hello i write simple block as select consumer_number from receipts where consumer_number not in (select consumer_number from consumer_master); in that receipts,consumer_master r table and both having consumer_number field before some days i deleted s