Passing object to EJB

Hi, I had a serializable data transfer object and i tried to pass into my session bean such as
public java.util.List retrieveCaseData(CASBasicDTO caseBasicDTO) throws Exception and i have this
error : java.lang.ClassCastException
It is very wierd. I tried to declare a new DTO inside my EJB, it works,but it give me an error when i try to pass in and out the DTO object. I half suspect is something to do with the RMI stuffs, but I don't know how to go about it to solve this problem.
Your advise is greatly appreciated. Thanks a lot!! :)

Do not hard-code the serial ID into your Objects - since you're dealing with remote calls, it's absolutely critical that the Objects on each side of the remote invocation be the exact same "version" of the Object. If they're not the same, you can/will get a marshalling-type exception, not a ClassCastException.

Similar Messages

  • Passing connection object as EJB parameter

    I am working on a legacy website which uses stateless session EJB's and runs on
    WebLogic 6.1 using JDK 1.3 and Oracle 8.1.6, I am working on upgrading this
    application to WebLogic 9.2, JDK 1.5 and Oracle 10.2.
    I configured a datasource in WebLogic using the Oracle thin XA driver.
    When attempting to run the application I got an error message stating that an
    object which is not serializable is being passed as an EJB parameter. I found that
    several EJB methods are passing open database connections as parameters so to fix this
    issue we should change the code. However, I am reluctant to change the code since I
    believe that the reason for passing the connection objects is that the developers
    wished to preserve transactions and so any changes might result in many issues in
    the application. I have the following questions:
    - The code is doing something which is not allowed. So why was this okay in WebLogic
    6.1 using the older Oracle oci driver?
    - One way to get around this would be to convert the EJB's to POJOS. There are no
    container based properties and the only EJB's are stateless session EJB's. The
    high water mark for concurrant usage is 40. There is only a single server (no clustering)
    What kind of issues would such a
    conversion bring?
    - Would it be better to convert the EJB's to local interfaces? What kind of issues would
    this bring?
    Any other suggestions would be very much appreciated.

    Salma Saad wrote:
    Thanks Joe,
    Converting to POPJOS from EJB or to local EJB's is changing the code but it limits changes to the logic of the application which could result in unforseen issues.
    There is only 1 server and 1 jvm but I get a not serlializable exception which I did not get when running this code on WebLogic 6.2 or 8.1 using Oracle 8.1.6 and 9i .I am getting it now that I am using WL 9.2 and Oracle 10.2.
    I looked through all the parameters and everything is a string except for Connection which does not implement serializable. There is a Vector but all the contained objects are strings. Let me know if you have any ideas what I can do to get rid of this, and also why is it happenning in the newer version of WL when it didn't happen before?
    weblogic.utils.AssertionError: ***** ASSERTION FAILED *****
         at weblogic.rmi.internal.CBVWrapper.copy(CBVWrapper.java:57)
         at com.isr.applications.isrinteractive.ejb.sessionbean.user.UserBean_x07h56_EOImpl_CBV.validateLogin(Unknown Source)
         at jsp_servlet._admin.__validatelogin._jspService(__validatelogin.java:187)
         at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)Hi. I looked at the code throwing this exception, and
    it's in a whole 'nother area of the server, nothing to
    do with JDBC or EJBs as such. It's odd too, because it
    seems to have already verified that whatever object
    it's dealing with is a serializable object...
    I recommend you're opening an official support case
    about this exception, and maybe they'll want help
    reproducing it...
    Joe
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:225)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:127)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
         at weblogic.servlet.internal.ServletStubImpl.onAddToMapException(ServletStubImpl.java:391)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:309)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at com.isr.applications.isrinteractive.servlets.reports.SessionFilter.doFilter(Unknown Source)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3212)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:1983)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1890)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1344)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
    Caused by: java.io.NotSerializableException: java.lang.Object
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1081)
         at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
         at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
         at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
         at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
         at weblogic.rmi.extensions.server.CBVOutputStream.writeObject(CBVOutputStream.java:84)
         at weblogic.rmi.internal.CBVWrapper.copy(CBVWrapper.java:49)
         ... 20 more

  • Passing objects by reference in PL/SQL

    Hi,
    I have come across an unexpected problem using object types in PL/SQL that is causing me some grief. I'm from a Java background and am relatively new to Oracle Objects but what I'm trying to do is fairly trivial, I think. The code below illustrates the problem.
    --- cut here ---
    CREATE OR REPLACE TYPE test_obj_t AS OBJECT
    num INTEGER,
    CONSTRUCTOR FUNCTION test_obj_t RETURN SELF AS RESULT
    CREATE OR REPLACE TYPE BODY test_obj_t IS
    CONSTRUCTOR FUNCTION test_obj_t RETURN SELF AS RESULT IS
    BEGIN
    num := 0;
    RETURN;
    END;
    END;
    CREATE OR REPLACE PACKAGE test_obj_ref AS
    PROCEDURE init(o IN test_obj_t);
    PROCEDURE inc;
    FUNCTION get_num RETURN INTEGER;
    END;
    CREATE OR REPLACE PACKAGE BODY test_obj_ref IS
    obj test_obj_t;
    PROCEDURE init(o IN test_obj_t) IS
    BEGIN
    obj := o;
    END;
    PROCEDURE inc IS
    BEGIN
    obj.num := obj.num + 1;
    END;
    FUNCTION get_num RETURN INTEGER IS
    BEGIN
    RETURN obj.num;
    END;
    END;
    --- cut here ---
    The object type test_obj_t holds a integer and the test_obj_ref package holds a 'reference' to an instance of the object.
    To test the above code I run this PL/SQL block:
    declare
    obj test_obj_t;
    begin
    obj := test_obj_t;
    test_obj_ref.init(obj);
    dbms_output.put_line('obj.num='||obj.num);
    dbms_output.put_line('test_obj_ref.get_num='||test_obj_ref.get_num);
    test_obj_ref.inc;
    dbms_output.put_line('obj.num='||obj.num);
    dbms_output.put_line('test_obj_ref.get_num='||test_obj_ref.get_num);
    test_obj_ref.inc;
    dbms_output.put_line('obj.num='||obj.num);
    dbms_output.put_line('test_obj_ref.get_num='||test_obj_ref.get_num);
    end;
    giving the output:
    obj.num=0
    test_obj_ref.get_num=0
    obj.num=0
    test_obj_ref.get_num=1
    obj.num=0
    test_obj_ref.get_num=2
    It appears that the object held by the test_obj_ref package is being incremented as expected, but I would have expected the object declared in the PL/SQL block to be pointing to the same object and so should report the same incremented values.
    I suspect that the object is copied in the call to test_obj_ref.init() so I end up with two object instances, one that is held by the test_obj_ref package and one in the anonymous block. Although, I thought that all IN parameters in PL/SQL are passed by reference and not copied!
    Am I right?
    Is passing objects by reference possible in PL/SQL, if so how?
    I'm using Oracle 10.2.0.3.
    Cheers,
    Andy.

    the object being passed to the test_obj_ref.init+ procedure is passed by reference; however, when you assign it to your package variable obj it is being copied to a new instance. you can pass object instances as parameters to procedures using the +IN OUT [NOCOPY]+ *calling mode, in which case modifications to the attributes of the passed object will be reflected in the calling scope's instance variable.
    oracle's only other notion of an object reference is the +"REF <object-type>"+ datatype, which holds a reference to an object instance stored in an object table or constructed by an object view.
    hope this helps...
    gerard

  • Passing object as parameter in JSF using h:commandLink tag

    Hi ,
    I have a scenario in which i need to pass objects from one jsp to another using h:commandLink. i read balusC article "Communication in JSF" and found a basic idea of achieving it. Thanks to BalusC for the wonderful article. But i am not fully clear on the concepts and the code is giving some error. The code i have is
    My JSP:
    This commandlink is inside a <h:column> tag of <h:dataTable>
    <h:commandLink id="ol3"action="ManageAccount" actionListener="#{admincontroller.action}" >
                   <f:param id="ag" name="account" value="#{admincontroller.account}" />
                   <h:outputText id="ot3" value="Manage Account" rendered="#{adminbean.productList!=null}" />
                   </h:commandLink>
    Also a binding in h:dataTable tag with the  binding="#{admincontroller.dataTable}"
                      My Backing Bean:
    public class CompanyAdminController {
              private HtmlDataTable dataTable;
              private Account account=new Account();
    public HtmlDataTable getDataTable() {
            return dataTable;
    public Account getAccount() {
             return this.account;
    public void setAccount(Account account) {
              this.account = account;
          public void action(){
                account= (Account)this.getDataTable().getRowData();
           } faces-config.xml
    <navigation-rule>
        <from-view-id>/compadmin.jsp</from-view-id>
        <navigation-case>
          <from-outcome>ManageAccount</from-outcome>
          <to-view-id>/manageAccount.jsp</to-view-id>
        </navigation-case>
      </navigation-rule>
    <managed-bean>
              <managed-bean-name>admincontroller</managed-bean-name>
              <managed-bean-class>com.forrester.AdminController</managed-bean-class>
              <managed-bean-scope>request</managed-bean-scope>
              <managed-property>
                   <property-name>account</property-name>
                   <property-class>com.model.Account</property-class>
                   <value>#{param.account}</value>
             </managed-property>
         </managed-bean>My account object:
    public class Account {
    string name;
      public String getName()
        return this.name;
      public void setName(String name)
           this.name=name;
      }I need to display #{admincontroller.account.name} in my forwarded jsp. But I am not sure whether the code i wrote in commandlink is correct. I get an error if i use <f:setActionListener> . No tag "setPropertyActionListener" defined in tag library imported with prefix "f"
    Please advise.
    Edited by: twisai on Oct 18, 2009 11:46 AM
    Edited by: twisai on Oct 18, 2009 11:47 AM
    Edited by: twisai on Oct 18, 2009 11:48 AM

    Yes.. iam removed the managedproperty from faces-config. But still i get the null pointer exception on main jsp itself and i am taken to second jsp manageaccount.jsp. Did you find anything wrong in my navigation case in the action method??
                                     public String loadAccount(){
               Account account = (Account)this.getDataTable().getRowData();
                return "ManageAcct";And also can you please answer this question i have
    The AdminController is the backing bean of 1st JSP and manageAccontController is the backing bean of forwarded JSP .
    Can i put this action method and dataTable binding in a 2nd manageAccontController backing bean instead of AdminController. But if i do that way dataList binding in h:dataTable tag will be in first JSP backing bean and dataTable binding to 2nd JSP. Not sure how to deal with this.
    {                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • ABAP Objects and EJB

    Hi every one,
    Can <b>ABAP Objects and EJB</b> be compared?
    -Naveen.

    Hi Naveen,
    Check this guide- might be useful-
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/dc09af90-0201-0010-d09b-bd611a11070b
    Regards,
    Moorthy

  • Memory leak problem while passing Object to stored procedure from C++ code

    Hi,
    I am facing memory leak problem while passing object to oracle stored procedure from C++ code.Here I am writing brief description of the code :
    1) created objects in oracle with the help of "create or replace type as objects"
    2) generated C++ classes corresponding to oracle objects with the help of OTT utility.
    3) Instantiating classes in C++ code and assigning values.
    4) calling oracle stored procedure and setting object in statement with the help of setObject function.
    5) deleted objects.
    this is all I am doing ,and getting memory leak , if you need the sample code then please write your e-mail id , so that I can attach files in reply.
    TIA
    Jagendra

    just to correct my previous reply , adding delete statement
    Hi,
    I am using oracle 10.2.0.1 and compiling the code with Sun Studio 11, following is the brief dicription of my code :
    1) create oracle object :
    create or replace type TEST_OBJECT as object
    ( field1 number(10),
    field2 number(10),
    field3 number(10) )
    2) create table :
    create table TEST_TABLE (
    f1 number(10),f2 number (10),f3 number (10))
    3) create procedure :
    CREATE OR REPLACE PROCEDURE testProc
    data IN test_object)
    IS
    BEGIN
    insert into TEST_TABLE( f1,f2,f3) values ( data.field1,data.field2,data.field3);
    commit;
    end;
    4) generate C++ classes along with map file for database object TEST_OBJECT by using Oracle OTT Utility
    5) C++ code :
    // include OTT generate files here and other required header files
    int main()
    int x = 0;
    int y = 0;
    int z =0;
    Environment *env = Environment::createEnvironment(Environment::DEFAULT);
    Connection* const pConn =
    env->createConnection"stmprf","stmprf","spwtrgt3nms");
    const string sqlStmt("BEGIN testProc(:1) END;");
    Statement * pStmt = pConn->createStatement(sqlStmt);
    while(1)
    TEST_OBJECT* pObj = new TEST_OBJECT();
    pObj->field1 = x++;
    pObj->field2 = y++;
    pObj->field3 = z++;
    pStmt->setObject(1,pObj);
    pStmt->executeUpdate();
    pConn->commit();
    delete pObj;
    }

  • Hoe to pass object as a parameter thru webSerive

    I need to pass Object as a parameter to web service:
    example:
    public calss returnCodes{
    int ret_code;
    String ret_string;
    public retrunCodes(int ret_code, String ret_string){
    this.ret_code = ret_code;
    this.ret_string = ret_string;
    public int getret_code()
    return this.ret_code;
    public String getret_string {
    return this,ret_string
    and other repc holder class to hold returnCodes
    public class retrunCodesHolder implents javax.xml.rpc.Holder
    returnCode value;
    pubic returnCodesHolder(){
    public returnCodesHolder(returnCodes value) {
    this.value = value;
    In Webservice I use returnCodesHolder as parameter.
    WebService getReturnCodesWs I have
    returnCodes retCodes = new returnCodes(04,"Good return code)
    returnCodesHolder retholder = new returnCodesHolder(retCodes)
    return myString;
    When I am calling above webService in servlet I have code:
    org.test.mytest.returnCodesHolder retHolder = new org.test.mytest.returnCodesHolder();
    String result = port.getReturnCodesWs(retHolder);
    How to I access /get values of returnCodes class in my calling servlet?
    I am using Tomcat v 6.0

    I believe (although have never used, so if I'm wrong,
    correct me please!) you can do it with implicit
    dynamic cursors, such as:
    For rec in 'select col1, col2 from table 1 '||lstr
    loop
    Not really:
    michaels>  declare
       lstr   varchar2 (30) := ' where empno = 7788';
    begin
       for rec in 'select * from emp e ' || lstr
       loop
          null;
       end loop;
    end;
    Error at line 1
    ORA-06550: line 5, column 4:
    PLS-00103: Encountered the symbol "LOOP" when expecting one of the following:
       . ( * @ % & - + / at mod remainder rem .. <an exponent (**)>
       ||

  • Objects of EJB in flex

    Hello.
    i want know if is possible that i can use Java Objects in my flex application using Blaze-Ds.
    I have all my business logic in Objects inside EJBs. Then, i need use it in a new flex application. I was read that i can do it, but i don't know how.
    Thanks
    Danilo
    Santa Marta - Colombia

    Hi there,
    Shortly put: Flex Builder is not Dreamweaver and nor are the Flex applications like HTML web pages. You can't creat any templates with wizzards or whatsoever, especially because Flex isn't really used to create web sites but rich internet applications ( although a web site might fall into this category, the two are still quite different Worlds ). So, the most you can do is either to develop a skeleton web site that you can fill with components later on ( which in my opinion is just a waste of time ) or create many little and standalone components that you can reuse in each project ( and also in projects that might not have anything to do with web sites ).
    If you are looking to create templates that you might have gotten used to in Dreamweaver ( or other softwares like DW ), then I think that nor Flash or Flex are the technologies for you ( especially not then if you are thinking of templates the same way when using these technologies as if you were using Dreamweaver/HTML templates ). Flex 4 did introduce "templates" but those templates do not really fall into this "website templates" category either ( if you want to read up on the what Flex 4 templates are then visit this page: http://livedocs.adobe.com/flex/gumbo/html/duplicate_1_WS52085436-ABD3-4d4d-B5E2-41C668CF68 47.html ).
    With best regards,
    Barna Biro

  • Passing Objects to Stored Procedures in SQL Queries: UNREF(REF(o))

    To me it seems that passing an object (type) to stored procedure in a SQL query is quite laborious. See:
    I created the following simple type:
    TYPE LAST AS OBJECT (
    id NUMBER
    defined a function:
    FUNCTION "CHECKLAST" (l LAST)
    RETURN NUMBER
    AS LANGUAGE JAVA
    NAME 'Checker.checkLast(Last) return int';
    created a typed table:
    CREATE TABLE lastTable OF Last;
    inserted some objects:
    INSERT INTO lastTable VALUES (1003);
    NOW! If want to use the StoredFunction I have to use the following syntax:
    SELECT checkLast(DEREF(REF(o)))
    FROM lasttable o;
    That's not very elegant.
    I would expect the follwing to be working:
    SELECT checkLast(o)
    FROM lasttable o;
    Did I do something wrong? Or did Oracle forget to implement the simple syntax?
    Even worse, the DEREF(REF(o)) trick does not work for member functions...
    Regards,
    André

    I did some experiments and can now (partly) answer my own question:
    Indeed, it is possible to declare a function with a parameter passed as reference:
    CREATE OR REPLACE TYPE Point AS OBJECT
    ID INT,
    MEMBER FUNCTION distance(q IN REF Point) RETURN NUMBER
    Unfortunately, it is not possible to use the REF in PL/SQL directly:
    CREATE OR REPLACE TYPE BODY Point is
    MEMBER FUNCTION distance(q IN REF Point) RETURN NUMBER
    AS
    BEGIN
    RETURN q.ID - SELF.ID; --Error(5,14): PLS-00536: No navigation through REF
    END;
    end;
    So, for testing purposes I decided to implement a very simple PL/SQL member function:
    CREATE OR REPLACE TYPE BODY Point is
    MEMBER FUNCTION distance(q IN REF Point) RETURN NUMBER
    AS
    BEGIN
    RETURN -1;
    END;
    end;
    BUT: The SQL query without VALUE is still not possible. The query
    SELECT *
    FROM PointTable d, PointTable e
    WHERE d.distance(e) > 0
    renders ORA-00904: "E": invalid identifier
    Somehow the 'e' seems to be misinterpreted completely.
    Illogically, the following query works fine:
    SELECT *
    FROM PointTable d, PointTable e
    WHERE d.distance(REF(e)) > 0
    The illogical thing is that, now 'E' seems to refer to a VALUE and not to REF (because we can use the REF function), whereas in Gaverill's post 'O' seems to refer to a REF (because we can use the VALUE function).
    My intent is to avoid both the VALUE(o) from Gaverill's example and the REF(e) from my example, because both is not intuitive for end users...
    Maybe I have to define a VIEW holding the object values... But then the end user has to use it in the FROM part.
    All in all, there seems to be no elegant solution for passing objects as parameters to functions...
    Regards,
    André

  • Can we pass objects to pl/sql block

    hi,
    can we pass objects to pl/sql block.i think we can.how to pass it.help me in getting the examples of "passing objects to pl/sql block"

    What exactly do you mean ? You can pass objects like any other parameters
    into and out from procedures/functions:
    SQL> create or replace procedure get_object(myobj in out nocopy my_obj)
      2  is
      3  begin
      4   dbms_output.put_line('ID : ' || myobj.empno);
      5   dbms_output.put_line('Salary : ' || myobj.sal);
      6   dbms_output.put_line('Department : ' || myobj.deptno);
      7   myobj.sal := myobj.sal*2;
      8  end;
      9  /
    Procedure created.
    SQL> declare
      2   mo my_obj := my_obj(1,1000,10);
      3  begin
      4   get_object(mo);
      5   dbms_output.put_line('New salary : ' || mo.sal);
      6  end;
      7  /
    ID : 1
    Salary : 1000
    Department : 10
    New salary : 2000
    PL/SQL procedure successfully completed.Rgds.

  • Passing Object parameters to Procedures in Oracle

    Hi,
    Can any one please provide me with a sample example how to pass object types as parameters (IN) to a procedure/package.
    Thanks in Advance.

    Here is a simple example
    SQL> create or replace type tbl as table of number
      2  /
    Type created.
    SQL> create or replace procedure proc(pTbl tbl)
      2  as
      3  begin
      4     for i in 1..pTbl.count
      5     loop
      6             dbms_output.put_line(pTbl(i));
      7     end loop;
      8  end;
      9  /
    Procedure created.
    SQL> exec proc(tbl(1,2,3,4,5))
    1
    2
    3
    4
    5
    PL/SQL procedure successfully completed.

  • Passing objects to a method.

    Hi,
    I was reading this from a book and puzzled by this suggestion:
    for example:
    public Employee findEmployee(String employeeID);
    This method takes a String specifying a unique employee id and returns the Employee object with that id, null otherwise. Don't pass un-necessary objects to methods, and return the appropriate results.
    Why not passing objects to methods, I found it is convenient to pass objects to methods, why ?
    Thanks in advance !
    Tee

    Of course you can pass objects to methods. A String is also an object.
    The author doesn't say to not pass any objects to methods, only no unnecessary objects. He propably means that you don't need a method likepublic Employee findEmployee(String employeeID, String country)to retrieve the Employee if the employee ID by itself is unique or you don't use the country in the method, to give you an example.

  • What is the use of passing object reference to itself ?

    What is the use of passing object reference to itself ?
    regards,
    namanc

    There is an use for returning an object reference from itself, for instance:
    class C {
    public:
         C append(C c) {
             // do something interesting here, and then:
             return this;
    }You can "chain" calls, like this:
    C c = new C();
    C d = new C();
    C e = new C();
    c.append (d).append (e);Maybe the OP has "inverted" the common usage, or thought about a static method of a class C that requires a parameter of type C (effectively being a sort of "non-static method").
    class C {
        static void doAnotherThing (C c) {
            c.doSomething(); //-- effectively C.doAnotherThing(c) is an "alternative syntax" for c.doSomething()

  • Yet Another "Passing Objects" Thread

    Hi All,
    Quick question about passing objects:
    I have three classes - ClassA, ClassB and ClassC. Lets say I create an object of ClassA in ClassB. Also, I would like to send the ClassA object from ClassB to ClassC to update its data. My question is, can I set the ClassA object in ClassC and modify it through ClassB? Confusing? I'll try to create an example below.
    ClassA:
    public class ClassA {
           // data
    } ClassB: creates and calls update methods for ClassA object
    public class ClassB {
           ClassA object = new ClassA();
           // print object
           ClassC ClassCFacade = new ClassC();
           ClassCFacade.setClassAObject(object);
           ClassCFacade.updateClassAObject(object);
           // print object
    }ClassC: updates object
    public class ClassC {
          // set object
          public void setClassAObject(ClassA object) {
                   // sets object
          // get object
          public ClassA getClassAObject() {
                  // returns object
          // modify object
          public updateClassAObject() {
                ClassA o = getClassAObject()
                // modify o
                setClassAObject(o)
    }So if objects are passed by reference, handle, or whatever you call it, essentially the above code should modify ClassA object created in ClassB, meaning the ClassA object should display it was modified after second print in ClassB. Although I've tried this implementation and the ClassA object is not modified after updateClassAObject method call from ClassB.
    Any input would be appreciated.
    Thanks,
    Bob

    OK. Here's snippets of actual code:
    public class ClassA implements SessionBean, ClassARemoteBusiness {
        // ClassA Attributes
        Integer ID;
        String name;
        // SET METHODS
        public void setClassAID(Integer ID) {
            this.ID = ID;
        public void setClassAName(String name) {
            this.name = name;
        // GET METHODS
        public Integer getClassAID() {
            return ID;
        public String getCLassAName() {
            return name;
    import classa.ClassA;
    import classc.ClassC;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class ClassB extends HttpServlet {
        private ClassA object;   
        private ClassC ClassCFacade;
        private ClassCFacade = lookupClassCBean();
        protected void processRequest(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
              HttpSession session = request.getSession();           
              // display object values - displays default values
              out.println("ID: " +object.getClassAID());
              out.println("Name: " +object.getClassAName());
             // update object
             ClassCFacade.setClassAObject(object);
             ClassCFacade.updateClassAObjectID(someInteger);
             ClassCFacade.updateClassAObjectName(someName);
              // display object values - displays updated values
              out.println("ID: " +object.getClassAID());
              out.println("Name: " +object.getClassAName());
        // LOOKUP METHODS
        private web.ServiceLocator serviceLocator;
        private web.ServiceLocator getServiceLocator() {
            // service locator code
        private classc.ClassCRemote lookupClassCBean() {
            // lookup code       
    import classa.ClassA;
    public class ClassC implements SessionBean, ClassCRemoteBusiness {
        private ClassA o;
        // SET METHODS
        public void setClassAObject(ClassA object) {
            o = object;
        // UPDATE
        public void updateClassAObjectID(Integer ID) {
            o.setClassAID(ID);
        public void updateClassAObjectName(String name) {
            o.setClassAName(name);
    }

  • Getting error when passing objects using IntelliJ  7.0

    Hi All,
    i have just started working in Web Services using Axis 2 in IntelliJ IDE. i am getting this error when i pass objects:
    org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.i have used rpc/literal, i tried with other combinations but not working.
    i have created two class called "address" and "user" and i want webservice client to pass "address" object to a "user" method.

    Hi,
    Try populating the ltab_extensionin as the code given below:
    Maybe it can help you.
    Constants: c_flag_bape_vbak TYPE  char10 VALUE  'BAPE_VBAK', " Constant
                     c_flag_bape_vbakx TYPE char10 VALUE  'BAPE_VBAKX'," Constant
      wa_bape_vbap-vbeln             = space.
       wa_bape_vbap-posnr            = wa_order_items_in-in_linenumber.
       MOVE c_flag_bape_vbak TO wa_extensionin-structure.
       MOVE c_flag_bape_vbap TO wa_extensionin-structure.
       CALL METHOD cl_abap_container_utilities=>fill_container_c
         EXPORTING
           im_value       = wa_bape_vbap
         IMPORTING
           ex_container = wa_extensionin-valuepart1.
       APPEND wa_extensionin TO it_extensionin.
       CLEAR : wa_extensionin.
       MOVE c_flag_bape_vbapx TO wa_extensionin-structure.
       wa_extensionin-valuepart1+0(10) = space.
       wa_extensionin-valuepart1+10(6) = wa_order_items_in-in_linenumber.
       wa_extensionin-valuepart1+80(3) = abap_true.
       APPEND wa_extensionin TO it_extensionin.
       CLEAR : wa_extensionin.
    Regards,
    Shweta

Maybe you are looking for

  • How to check object code

    Dear Team, I want to check Object Code  of T_Code:OMJJ. In T_code:SE93.it not showing . How I check Perticulater Object Code for Transastion  OMJJ thanks kallis

  • Converting a layer on the main timeline into a movieclip

    I'm not really sure how to properly describe this so please bear with me. Say you create an animated action on your main timeline with a symbol. Then you decide you want to take that action and put it into a movie clip so that it migrates across the

  • Huge Local Mac Calendar to my iPad

    Hello, I have a huge calendar locally on my macs calendar app. It has more thank 40.000 entries. Since I know that iCloud has a limit of 25.000 entries does anybody knows how could I bring it in to my iPad ? I dont care about syncronazation because i

  • How to save/reinstall 9.2 iTunes, programs, when switching to Tiger?

    Hi, fellow Macphiles! I've got some serious questions about switching to Tiger. I hope some of you can help me! For starters, I've been extremely reluctant to switch to OS X - period. I've been pretty comfy with OS 9.2 for a long time. But, alas, loo

  • Grant.sql

    hi all i wish to grant select privelege to all the tables in user_tables to a user created by me select ' Grant Select on '|| table_name || ' to user_name ' from user_tables ; now when i run this i do get the grant succeeded when i spool and create a