Is itpossible recover BPM Object instance from Screenflow in Grab Activity?

My process has two roles: role1 and role2.
role2 has an activity of type "Interactive" and the implementation type of this activity is Screenflow, in this Screenflow I have an instance variable of the type BPM Object.
role1 has a Grab Activity from Interactive Activity that describes above, the Grab Activity has a unconditional transition to another Interactive Activity and this Interactive Activity has the same implementation type of the Interactive Activity of the role2 and points to the same Screenflow.
I need to recover the values of the BPM Object that filled in role2, in other words, I need the same instance of the BPM Object in Interactive Acitivity of the role2 in the role1.
If an user filled a field called "name" of BPM Object in the Interactive Activity of the role2, it needs to see that value in the Interactive Activity of the role1 after grabbed this activity of the role2 to role1.
Is it possible?

Hi,
Sure it's just me, but I got a bit lost with the description of what you're trying to do. One place I got lost was in the discussion of roles. Roles are used in Oracle BPM processes for a variety of reasons, but I'm not sure they're germane to your problem so I'm trying to rephrase your question without their use.
Here's my attempt to rephrase what it is that I think you're trying to do:
1. I think you have two activities. I'm naming them "Check Credit" and "Final Check"
2. I'm guessing you have a transition between the two activities "Check Credit" and "Final Check"
3. Your process has an instance variable that is a BPM Object that I'm naming "customer". Since it's a BPM Object type, it has a variety of attributes (e.g. customer.name, customer.address, etc.)
4. You have a Grab activity that has its "Runtime" property set to be "Defined" (meaning you have transitions defined coming into and out of the Grab activity). I think you might have a transition going from the "Final Check" activity to your Grab activity and I think you might have a transition going from the Grab to the "Check Credit" activity.
Does this describe your process? I'm assuming you probably want to have the instance variable revert back to original values of the instance variable object before work was done in one of the activites, but don't want to head too far down this path until you confirm that this is what you want to know.
Thanks,
Dan

Similar Messages

  • How to invoke BPM object instance variable from interactive activity?

    I have a screenflow with an automatic activity "A" followed by an interactive activity "B". "B" calls a BPM object "X" and uses a JSP presentation to show its attributes. Is there a way to use another BPM object, say type "Y", create an instance variable of that type inside "A", and get its attributes values from the JSP page associated to "B"?
    Edited by: user6473912 on 20/07/2010 03:37 PM

    Try this. It assumes you have:
    <li> a user named "auto"
    <li> a project variable named "customerType"
    <li> an instance variable named "orderAmount" that is a decimal
    <li> an instance variable named "order" that is a BPM Object that has attributes named "customerName" and "amount"
    ps as ProcessService
    xmlObject as Fuego.Xml.XMLObject
    do 
      connectTo ps
          using url = Fuego.Server.directoryURL,
          user = "auto",
          password = "auto"
      instF as InstanceFilter
      create(instF, processService : ps)
      addAttributeTo(instF, variable : "customerType", comparator : IS, value : "Gold")
      instF.searchScope = SearchScope(participantScope : ParticipantScope.ALL, statusScope : StatusScope.ONLY_INPROCESS)
      for each inst in getInstancesByFilter(ps, filter : instF) do
        // here's how to get the value inside a primitive instance variable
        orderAmtObj as Object = getVar(inst, var : "orderAmount")
        // here's how to get the value of attributes inside a complex BPM Object instance variable
        //    - in this case this is an "order" object with two attributes (customerName and amount)
        orderObj as Object = (getVar(inst, var : "order"))
        xmlObject = Fuego.Xml.XMLObject(createXmlTextFor(DynamicXml, object : orderObj, topLevelTag : "xsi"))
        logMessage "The value of the order object's customer name is: " +
               selectString(xmlObject, xpath : "customerName")
        logMessage "The value of the order object's order amount is: " +
               selectNumber(xmlObject, xpath : "amount")
        // here's a rather uninspired way to retrieve who the participant is that was assigned the instance
        logMessage "The participant assigned to this instance is: " + inst.participantId
      end
    on exit
      disconnectFrom ps
    endDan

  • Can we move back an instance from end to previous activity?

    Hi,
    Using Oracle BPM WL 10.3 MP2, Can we move back an instance from end to previous activity? If yes are there any ways to make this happen? I guess that instances which are aborted cannot be brought back from end activity? but not sure.
    Any ideas / suggestions?
    Thanks,
    -Sree

    If the instance was aborted due to an exception, you could have an exception handler which would allow you to handle the error, and then retry if desired...
    However, once the instance is at End, its done...
    -Kevin

  • Initiating BPM Process Instances from External Web Service Call

    I'm attempting to update the HelloWorld example so that I can create an instance of the process from an External Web Services Call rather than via the Workspace. Our current SOA Architecture is configured so that all BPM instances are managed through a .NET SmartClient via the Service Bus and the use of PAPI W/S and so I'm wishing to recreate this capability in the new BPM.
    I understand the replacement for PAPI W/S is Human Workflow so I've therefore updated and republished the HelloWorld Example with an Exposed 'TaskService' Service for the Human Task within the BPM Process.
    I've then attempted to reference the TaskService through our existing BPM, and have been able to import a number of generic WSDL's as follows:
    Task Service
    http://vmaquatestapp2:7001/integration/services/TaskService/TaskServicePort?WSDL
    Task Metadata Service
    http://vmaquatestapp2:7001/integration/services/TaskMetadataService/TaskMetadataServicePort?WSDL
    Task Query Service
    http://vmaquatestapp2:7001/integration/services/TaskQueryService/TaskQueryService?WSDL
    When I examine the available operations for these generic services, there are quite a lot, each of which have a fairly complex schema. I believe I should be using the TaskService: InitiateTask Operation to create an instance of my BPM Process but my questions are:
    - Is the above the correct method of interacting with BPM Instances from an external system such as the Service Bus?
    - Does anyone have any examples of a basic XML payload that would initiate a process instance?

    I created an process with a message start event and can call it from an external web service call. I can also pass input arguments and map those to process data objects. However I can not find how to return data as response to the external web service call as e.g. the process instance id.
    Is it possible to this?
    Gr,
    Gert Jan Kersten

  • Create SOFM object instance from PDF

    Hi All,
    I am using 4.6 version of SAP where FM 'sap_wapi_attachment_add' is does not exit. My query is to create an attachment (SMARTFORM coverted in PDF) in ABAP progam which i have to send as attachment with a Decision Task in the workflow.
    I am able to send attachment with mail but to send attachment with decision task i need to create an instance of SOFM object. Please suggest an alternative method to do so instead of FM 'sap_wapi_attachment_add' .

    Hi Taran,
    I had put my code in workflow task. You can find the task method code below:
    *Data declaration
    DATA: GITAB     TYPE SOLIX_TAB,                     
          GSTAB     LIKE LINE OF GITAB,                 
          SOFM_KEY  TYPE SOFMK,                         
          GIT_LINES TYPE SOLI_TAB.                      
    DATA: LREF_DOCUMENT_BCS  TYPE REF TO CL_DOCUMENT_BCS,
          LREF_IM_DOCUMENT   TYPE REF TO IF_DOCUMENT_BCS.
    Generate Smartform*
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
        EXPORTING
          FORMNAME                 = C_FORM
    *      VARIANT                  = ' '
    *      DIRECT_CALL              = ' '
        IMPORTING
          FM_NAME                  = GV_FM
        EXCEPTIONS
          NO_FORM                  = 1
          NO_FUNCTION_MODULE       = 2
          OTHERS                   = 3.
      IF SY-SUBRC <> 0.
    *    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *       WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      CALL FUNCTION 'SSF_GET_DEVICE_TYPE'
        EXPORTING
          I_LANGUAGE                   = SY-LANGU
    *      I_APPLICATION                = 'SAPDEFAULT'
        IMPORTING
          E_DEVTYPE                    = GV_OUTPUT_OPTIONS-TDPRINTER
        EXCEPTIONS
          NO_LANGUAGE                  = 1
          LANGUAGE_NOT_INSTALLED       = 2
          NO_DEVTYPE_FOUND             = 3
          SYSTEM_ERROR                 = 4
          OTHERS                       = 5.
      IF SY-SUBRC <> 0.
    *    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *       WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      GV_OUTPUT_OPTIONS-TDNOPREV = 'X'.
      GV_CONTROL_PARAMETERS-GETOTF = 'X'.
      GV_CONTROL_PARAMETERS-NO_DIALOG = 'X'.
      CALL FUNCTION GV_FM
        EXPORTING
    *      ARCHIVE_INDEX              =
    *      ARCHIVE_INDEX_TAB          =
    *      ARCHIVE_PARAMETERS         =
          CONTROL_PARAMETERS         = GV_CONTROL_PARAMETERS
    *      MAIL_APPL_OBJ              =
    *      MAIL_RECIPIENT             =
    *      MAIL_SENDER                =
          OUTPUT_OPTIONS             = GV_OUTPUT_OPTIONS
          USER_SETTINGS              = 'X'
          GV_ENAME                   = GV_ENAME
          GV_PERNR                   = GV_PERNR
          GV_PERSK                   = GV_PERSK
          GV_ZZ_LEVEL                = GV_ZZ_LEVEL
          GV_BTRTX                   = GV_BTRTX
          GV_GBDAT                   = GV_GBDAT
          GV_JOIN_DATE               = GV_JOIN_DATE
          GV_RESIN_DATE              = GV_RESIN_DATE
        IMPORTING
          DOCUMENT_OUTPUT_INFO       = GV_DOCUMENT_OUTPUT_INFO
          JOB_OUTPUT_INFO            = GV_JOB_OUTPUT_INFO
          JOB_OUTPUT_OPTIONS         = GV_JOB_OUTPUT_OPTIONS
        EXCEPTIONS
          FORMATTING_ERROR           = 1
          INTERNAL_ERROR             = 2
          SEND_ERROR                 = 3
          USER_CANCELED              = 4
          OTHERS                     = 5.
      IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      CALL FUNCTION 'CONVERT_OTF_2_PDF'
    *    EXPORTING
    *      USE_OTF_MC_CMD               = 'X'
    *      ARCHIVE_INDEX                =
        IMPORTING
          BIN_FILESIZE                 = GV_BIN_FILESIZE
        TABLES
          OTF                          = GV_JOB_OUTPUT_INFO-OTFDATA
          DOCTAB_ARCHIVE               = GIT_DOCS
          LINES                        = GIT_LINES_TEMP
        EXCEPTIONS
          ERR_CONV_NOT_POSSIBLE        = 1
          ERR_OTF_MC_NOENDMARKER       = 2
          OTHERS                       = 3.
      IF SY-SUBRC <> 0.
    *    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *       WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      CALL FUNCTION 'SX_TABLE_LINE_WIDTH_CHANGE'
        TABLES
          CONTENT_IN  = GIT_LINES_TEMP
          CONTENT_OUT = GIT_LINES.
      IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      CALL FUNCTION 'SO_SOLITAB_TO_SOLIXTAB'
        EXPORTING
          IP_SOLITAB  = GIT_LINES   "GIT_LINES_TEMP1
        IMPORTING
          EP_SOLIXTAB = GITAB.
    *Create SOFM object from smartform PDF
    IF NOT GITAB IS INITIAL.                    
          TRY.                                                        
              CALL METHOD CL_DOCUMENT_BCS=>CREATE_DOCUMENT            
                EXPORTING                                             
                  I_TYPE          = 'BIN'                             
                  I_SUBJECT       = 'NOTICE PAY WAIVER FORM'          
    *          I_LENGTH        =                                      
    *          I_LANGUAGE      = SPACE                                
    *          I_IMPORTANCE    =                                      
    *          I_SENSITIVITY   =                                      
    *          I_TEXT          =                                      
                  I_HEX           = GITAB                             
    *          I_HEADER        =                                      
    *          I_SENDER        =                                      
                RECEIVING                                             
                  RESULT          = LREF_DOCUMENT_BCS.                
            CATCH CX_DOCUMENT_BCS .                                   
          ENDTRY.                                                                               
    LREF_IM_DOCUMENT = LREF_DOCUMENT_BCS.                                                                               
    TRY.                                                        
              CALL METHOD LREF_DOCUMENT_BCS->ADD_DOCUMENT_AS_ATTACHMENT
                EXPORTING                                             
                  IM_DOCUMENT = LREF_IM_DOCUMENT.                     
            CATCH CX_DOCUMENT_BCS .                   
          ENDTRY.                                                                               
    TRY.                                        
              CALL METHOD LREF_DOCUMENT_BCS->GET_DOCTP
                RECEIVING                             
                  RESULT = SOFM_KEY-DOCTP.            
            CATCH CX_OS_OBJECT_NOT_FOUND .            
          ENDTRY.                                                                               
    TRY.                                        
              CALL METHOD LREF_DOCUMENT_BCS->GET_DOCYR
                RECEIVING                             
                  RESULT = SOFM_KEY-DOCYR.            
            CATCH CX_OS_OBJECT_NOT_FOUND .            
          ENDTRY.                                                                               
    TRY.                                        
              CALL METHOD LREF_DOCUMENT_BCS->GET_DOCNO
                RECEIVING                             
                  RESULT = SOFM_KEY-DOCNO.            
            CATCH CX_OS_OBJECT_NOT_FOUND .            
          ENDTRY.                                                                               
    SWC_CREATE_OBJECT NOTICE_PAY_WAIVER_FORM 'SOFM' SOFM_KEY.
          SWC_SET_ELEMENT CONTAINER 'NOTICE_PAY_WAIVER_FORM'      
                                     NOTICE_PAY_WAIVER_FORM.      
        ENDIF.
    The object instance thus created will be visible along with other  object instances in the workitem display. Provide this object in binding of decision step as you provise any other obect instance and not as ATTACH_OBJECT       
    Regards,
    Neha

  • BPM object names from JDeveloper

    Hi All,
    I'm developing BPM 10.3.1.0 JSP pages in JDeveloper 11.1.1.2.0, rather than using the rather clunky presentation/screen flow designer.
    I'm editing the JSP tags in JDeveloper and am having to manually add in the attribute names of my BPM objects. This isn't great as it's slow and my typing isn't good thus causing some RTEs.
    Does anyone know how to either import the BPM Object into JDeveloper so it can be dragged and dropped from, say, the JDeveloper Component Palette (just like the JSP tags), or some other more ingeneous way of building the JSP page without having to remember the BPM object attributes and manually key them in?
    ...or am I consigned to the long-promised BPM 11g?
    I've hunted this forum and the docs but can't put my finger on this answer to this one.
    Many thanks in advance.
    Yours lazily,
    Phil.

    I found a solution for my problem:
    http://www.sdn.sap.com/irj/boc/index?rid=/library/uuid/e06b823c-cc66-2b10-2f94-8d3151c2b4a4

  • Refering to object instances from a jsp

    How can i call object instances within class instances in my application -- from a jsp?
    In other words, i want to reference to an pre-existing application instance of a class.
    I do not want "use:bean" -- which will use a class (not the specific instance i am looking for in the application).
    I also do not want a binding to a variable only ( #{class.variable} ).
    Thank You!
    eric

    That's a good reminder of how to positively access class2, stevejluke. Thanks.
    However, i have found by trying to access a simple String in Class1 that the class1 instantiated by the jsf page (this comes up first in the application and has components which require Class1) is not the same instantiation that being accessed by the jsp page (which is navigated to by a button from the jsf page).
    I put:
    <jsp:useBean id="myBean" class="com.mycompany.expense.EntryHandler" scope="session"/>
    at the top of both the jsf and the jsp page.
    faces-config.xml has:
    <managed-bean>
    <description>
    Glue bean for entry related events and the current entry data
    </description>
    <managed-bean-name>entryHandler</managed-bean-name>
    <managed-bean-class>
    com.mycompany.expense.EntryHandler
    </managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    <managed-property> ((about 4)) <managed-property>
    <managed-bean>
    I tried setting <managed-bean-name> equal to the id in the jsp:useBean tag but drew the an error indicating the the <jsp:useBean ...> tag had instantiated the class before the faces-config.xml file had -- hence the managed property could not be found.
    I also tried putting name="entryHandler" in the <jsp:useBean > tag, but this is not allowed.
    Hmm, how to get the <managed-bean> and <jsp:useBean> to match?
    Maybe i have to put in code to the effect "get context " "get instantiation" etc,
    I'll have to try looking it up . . .

  • Transient java object instance from jvm through jni?

    Hello, All
    Sometimes I want manage the memory take by object instance,
    for example, If I want to design a cache which cache a huge number object.
    Then, there may two problems:
    1, May occur OutOfMemory error.
    2, I want like to manually reclaim the memory take by the cached object,
    not by gc, because it may take a little time to check the reference for gc.
    Just as you know, there is keyword transient for serialization.
    I want know if some same mechanism for object instance creating or release, managing memory by jni, or by some other way?

    No, since you're not supposed to do that. hence you can't really expect Java to provide the means...
    Maybe you can use classes like WeakReference etc. but that won't bypass GC.

  • Object instance from bean to bean

    Hi.
    I have backing bean with next structure:
    import mypackage.ClassA;
    public class BeanName1{
    private ClassA instanceClassA;
    public ClassA getInstanceClassA();
    public void setInstanceClassA(ClassA a);
    public class BeanName2{
    How can I get instance fro object instanceClassA in other bean class BeanName2?
    Thx.

    Sinnerman,
    Exactly what are you trying to do? What are the scopes of your two beans? Depending upon what you are trying to do, there are different answers as to the best way...
    For example, if you're trying to pass parameters from one page to another, you could look at using af:setActionListener.
    Another method would be to inject the value into the second bean as a managed property (assuming the bean scopes would support it).
    In short - more information is needed about what exactly you are trying to do in order to suggest the best approach.
    Regards,
    John

  • How to communicate (transfer object instance) between to java vm?

    Hello, All
    If possible to transfer object instance straight between two java vm?

    It is possible to copy an object instance from one java application to another. Define it as serializable, and pass it as a parameter to an RMI call.

  • Using multiple instance variables or BPM objects in a single JSP

    In my screenflow, for an user activity, I've selected a BPM object variable for my JSP and using this BPM object variable within the JSP to display or accept values related to this BPM object.
    But in certain circumstances, I need access to some of the instance variables defined in my screenflow (which are not members of the BPM object), and to get these variable values displayed in my JSP. I don't want to overload my BPM object with all these instances as they do not logically fit as members in this BPM object.
    For example, if I need to capture and display the logged in user name across the JSPs in my web application, then how can I do that without specifying this user variable in all of my BPM objects.
    Is there any extensibility in using more than one BPM object variables in my JSPs? Why is it that a single BPM object variable is tied to a JSP? Or am I missing something else here?

    I'm with the same problem!

  • Calling a method in BPM Object from jsp page

    hi all,
    I try to call a method from BPM Object using <f:invokeUrl >
    I change server side method properties to yes.
    and then how can i get request and response object inside the BPM method.
    Thanks.

    Thanks for ur response,
    But i mention about BPM method inside BPM Object.
    i found this inside the documentation.
    methodName(Fuego.Net.HttpRequest request, Fuego.Net.HttpResponse response)
    i need to match above BPM method and <f:invokeUrl > tag. am i right?
    But i don't know how to create method with argument "Fuego.Net.HttpRequest request, Fuego.Net.HttpResponse response" inside BPM Object.
    I can't find any place to define method argument inside Oracle BPM studio.
    I don't know how to parse argument like "Fuego.Net.HttpRequest request, Fuego.Net.HttpResponse response"
    With Regards,
    Wai Phyo
    Edited by: user8729650 on Sep 9, 2009 7:03 PM
    Edited by: user8729650 on Sep 9, 2009 9:20 PM

  • Calling a method in BPM Object from jsf page

    Hi All,
    How do I call a method in BPM object from JSF page? Is it possible to invoke it in a manner similar to invoking a method from managed bean in JSF application?
    Please help.
    Thanks and Regards,
    Veronica

    You can use f:invoke (or f:invokea to with parameters)
    For ajax calls, you can use f:invokeUrl to get the URL to a particular method within your BPM object, although make sure the Server-Side Method property is set to Yes.
    http://download.oracle.com/docs/cd/E13154_01/bpm/docs65/taglib/index.html

  • Start BPM instance from soapUI

    Hi all,
    I want to start an instance of a BPM process by using soapUI. I enabled WS-RM and WS-A but I get the following error:
    <SOAP-ENV:Envelope xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
       <SOAP-ENV:Header>
          <To xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</To>
          <Action xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing/fault</Action>
          <RelatesTo xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">uuid:18bf251f-6f8e-46b2-a107-54ee9e8a6432</RelatesTo>
       </SOAP-ENV:Header>
       <SOAP-ENV:Body>
          <SOAP-ENV:Fault>
             <faultcode xmlns:dPrf="http://www.sap.com/NW05/soap/features/wsrm/">dPrf:N/A</faultcode>
             <faultstring xml:lang="en">Error during obtaining data for Sequence ID: dPrf:ProcessException. No relevant data available in DB.</faultstring>
             <faultactor>Server</faultactor>
             <detail>
                <yq1:com.sap.engine.services.wsrm.exceptions.ReliableMessagingException xmlns:yq1="http://sap-j2ee-engine/error">Error during obtaining data for Sequence ID: dPrf:ProcessException. No relevant data available in DB.</yq1:com.sap.engine.services.wsrm.exceptions.ReliableMessagingException>
             </detail>
          </SOAP-ENV:Fault>
       </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    Somebody got an idea how to solve this? Starting in instance from the WSNavigator or VC is possible, but for automated testing, I would like to use soapUI.
    Thanks!

    Hi,
    Change your WSDL file you will have a tag
    <wsp:Policy ... />
    add to that tag the following lines
    <wsp:Policy ... >
    <sapcomhnd:enableCommit xmlns:sapcomhnd="http://www.sap.com/NW05/soap/features/commit/">false</sapcomhnd:enableCommit>
    <sapblock:enableBlocking xmlns:sapblock="http://www.sap.com/NW05/soap/features/blocking/">true</sapblock:enableBlocking>
    <saptrhnw05:required xmlns:saptrhnw05="http://www.sap.com/NW05/soap/features/transaction/">no</saptrhnw05:required>
    <saprmnw05:enableWSRM xmlns:saprmnw05="http://www.sap.com/NW05/soap/features/wsrm/">false</saprmnw05:enableWSRM>
    </wsp:Policy>

  • Help! How to convert an instance from java.lang.Object to a particula class

    * How to convert an instance from java.lang.Object class to a particular class
    witch is known only at the running time?
    Roster EJB component is make up of RosterHome, Roster and RosterBean.
    RosterHome is the home interface of Roster EJB.
    Roster is the remote interface of Roster EJB.
    RosterBean is the implement of Roster EJB.
    The following code segment is to invoke Roster EJB component.
    String jndiName="roster.RosterHome";
    javax.naming.Context initial = getInitialContext();//getInitialContext() returns a instance of Context.
    Object objref = initial.lookup(jndiName);
    RosterHome home =
    (RosterHome)javax.rmi.PortableRemoteObject.narrow(objref,
    RosterHome.class);
    Roster myRoster = home.create();
    String team="T1"
    String player="Tom"
    myRoster.addPlayer(player,team);
    But, now, all the home interface, the remote interface and the JNDI Name of
    Roster EJB component are not been known at the compiling time. However They are
    known at the running time, throught reading from the XML config file.
    Questions:
    1,How to write code for this case ? or
    2,How to convert an instance from Object class to a particular class witch is known
    only at the running time?
    String jndiName="roster.RosterHome";// in fact, reads from XML file.
    String homeClassName="roster.RosterHome";// in fact, reads from XML file.
    String remoteClassName="roster.Roster";// in fact, reads from XML file.
    javax.naming.Context initial = getInitialContext();//getInitialContext() returns a instance of Context.
    Object objref = initial.lookup(jndiName);
    Object objHome= javax.rmi.PortableRemoteObject.narrow(objref,
    Class.forName(homeClassName));
    /* how to do next?
    }

    I am not sure what you are trying to do. But at some point you should know which methods to call on the remote interfaces. Maybe the method names are stored in the XML file as well or you have a set of standard method names (also consider parameters).
    However, this can be solved by reflection. Look at the java.lang.reflect package, especially java.lang.reflect.Method, and also at java.lang.Class.
    If you are doing this on the app server:
    I've seen posts where people say that reflection is not permitted in EJB, but I don't think so. Check the EJB spec.
    If you are doing this in an application: reflection is always permitted. Probably also in applets and JSP.

Maybe you are looking for

  • Trying to edit my iTunes account, it keeps timing out prematurely why?

    Trying to edit info in my iTunes account it keep timing out prematurely why?

  • Compression in oracle 9i!!

    Dear Friends Have any one tested the compression for Oracle 9i tables in the production, and if yes, can you share the pros and cons of that!! cheers

  • Problem when sync repeat events with ical

    Hi all, I've a strange problem that happen when I sync repeated events on my mac versus iphone... With iCal I can see correctly an events repeated for example for two days... (using the option repeat every day with an end date). After syncing, on ima

  • Setting account to use Skydrive

    Has anybody tried to setup an account for Skydrive? My officejet 6700 has Dropbox and Google Drive and other in the settings. I have tried various skydrive URL's. Please help. Thanks.....

  • IPhone Tip #1

    To measure your iPhone typing skills in terms of words per minute, tap Safari and visit iphonetypingtest.com - another good iPhone typing trainer can be found at: voxifera.com/itypex