Storing/Recalling of EJB Objects

Hi
I have a servlet that accepts a XMLDocument in the doPost method.In this XML I have the following nodes:
EJBName, EJBMethod, Parameter1,...
The Servlet has already done the JNDI lookup and creation of my EJB's (quite a lot of them).
I would now like to store the EJB object in some sort of array and extract the correct one depending upon the values received in the XML Doc.
Example...
WizIsisIMEIHome wizIsisIMEIHome = (WizIsisIMEIHome)ctx.lookup("WizIsisIMEI");
wizIsisIMEI = wizIsisIMEIHome.create();
I would now like to put this object into the array with a reference name: ie IsisEJB.
If I now receives the following data in the XMLDoc, I would like to do the following:
Lookup EJB object by reference (IsisEJB).
Build up the following statement:
EJBName .EJBMethod(param1, ...);
XMLDocument outXMLDoc = wizIsisIMEI.getLastIMEIXML( msisdn, imei, retMessage, retCode );
I can do this with a CASE/SWITCH but this will be cumbersome/ugly with 90 EJB's!
Any ideas/samples will be appreciated
Tks
Andre

I would now like to put this object into the array
with a reference name: ie IsisEJB.Use a HashMap, with the EJB name as the key. When handling an incoming request, acquire the Remote (or Local) interface from the Map using the specified EJBName from your request.
Then use the Reflection API to acquire a Method object representing the remote method you want to call and invoke it.
.P.

Similar Messages

  • I need to add the values stored in the session object into the html textbox

    Dear Sir,
    i have been trying to create an edit employee details page
    What i have done till now is as follow:
    1. Got employee id from HTML page.
    2. Compared it with the id stored in the database.
    3. If the id is correct then pulled the record of the corresponding employee and stored it in the session object.
    4. Dispatched the session values to another servlet EditEmpDetails2.java
    what i need to do now
    5. Now i need to set the session values in the text field of the html form
    6. I also need to be able to edit those vales and store the edited values in the database.
    Please help me as i have tried doing it for 1 week without any clues
    i have tried to create a html page which is something like this:
    <html>
    <head>
    <title>Edit Employee Details Page</title>
    <body BGCOLOR="red" text="black">
    <h1 ><font color="black">Edit Employee Details Page</font></h1>
    <form action = "EditEmpDetails" method="Get">
    <table width="50% align="center"
    <tr><td>Employee ID: </td>
    <td><INPUT TYPE="TEXT" name="employeeid"<br></td></tr>
    <tr><td><center><input type="submit" value="submit"></center></td></tr>
    <tr><td><center><input type="reset" value="reset" ></center></td></tr>
    </table>
    </form>
    </body>
    </html>
    design of my servlet EditEmpDetails.java
    public void EditEmpDetails1 extends HttpServlet
    public void doGet(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException
    PrintWriter out = response.getWriter();
    response.setContentType("text/html");
    HttpSession session = request.getSession();
    String employeeid;
    String X = request.getParameter("employeeid");
    System.out.println("Employee iD:" + X);
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection con = DriverManager.getConnection("jdbc:odbc:murphy");
    String query = "Select * from users where employeeid=?";
    PreparedStatement stat = con.prepareStatement(query);
    System.out.println(stat);
    stat.setString(1,X);
    ResultSet rs = stat.executeQuery();
    while(rs.next())
    String Z = rs.getString(password);
    if(Z.equals(X))
    String A = rs.getString(1);
    session.setAttribute("employeeid", A);
    String B = rs.getString(2);
    session.setAttribute("firstname", B);
    String C = rs.getString(3);
    session.setAttribute("lastname", C);
    String D = rs.getString(4);
    session.setAttribute("gender", D);
    String E = rs.getString(5);
    session.setAttribute("dateofbirth", E);
    String F = rs.getString(6);
    session.setAttribute("address", F);
    String G = rs.getString(7);
    session.setAttribute("postalcode", G);
    String H = rs.getString(8);
    session.setAttribute("phone", H);
    String I = rs.getString(9);
    session.setAttribute("mobile", I);
    String J = rs.getString(10);
    String url = "/EditEmpDetao;s.java";
    RequestDispatcher dispatcher = getServletContext().getRequestDispatcher(url)
    dispatcher.forward(request,response);
    catch (Exception e)
    system.out.println(e)
    I do not know how to put the values stored in the session object into the html text box

    3. If the id is correct then pulled the record of the corresponding employee and stored it in the session object.do you really need to store this in session object?
    5. Now i need to set the session values in the text field of the html form which form? in a new html/jsp page? i suggest go for a JSP
    In your JSP page use JSP expression tags to put the session attributes.
    it's something like : <input type='text' name='employeeid' value='<%= session.getAttribute("employeeid") %>' >and you need to generateanother servlet for saving the details/modifications to the database.
    I think i m clear enough.
    if you need more clarifications. just try it and then post your problem.
    Diablo

  • Calling stored procedure from EJB in JSever

    I have some trouble to call stored procedure from EJB deployed to JServer on Oracle8i (815).
    I have been able to sucessfully test the stored procedure using thin client JDBC driver. But when I user the default connection in JServer, the stored procedure never got called. Is there any restriction of EJB in JServer?
    Thanks
    null

    Thanks man! that was a great help. looks like i am almost there. i created those items t obe hidden.
    now i am passing three parameters to the procedure. my url for that column value looks like this,
    javascript:P65_PARTITION_ID=#PARTITION_ID#;P65_DBC=#DBC#;P65_FILE_ID=#FILE_ID#;doSubmit('Sku_Save');
    the #DBC# parameter is a name of the person that has spaces(firstname lastname). i am getting a javascript error saying,
    Line: 1
    Char: 37
    Error:Expected ';'
    i see that char 37 is the space after firstname.
    any idea how i should get rid of this error.
    Also, as you have been very helpful, a question further beyond :). the above procedure will return a OUT varchar parameter. i guess i have to create another item for that. how do i read it and display just below my report as text.
    Thanks Again!

  • How can i get the value stored in the session object using its sessionid

    how can i get the value stored in the session object using its sessionid by running stand alone java application

    myforum wrote:
    how can i get the value stored in the session object using its sessionid by running stand alone java applicationThis does not seem to make sense! You need at least to give a lot more detail of what you are doing.

  • PDF generated in SAP backend to be stored in Cloud Proxy object

    Dear Colleagues,
    We generate the pdf file in SAP backend system and send the pdf as an attachment to email address. Along with this we also want to automatically have this pdf file stored in Cloud Proxy object. So that users can access these files in Cloud portal when needed.
    If anyone has expertise on this topic, please share or suggest the solution.
    Thanks,
    Arun

    Hi Arun,
    Would you like to achieve an automatic way to store the document in cloud portal? Can you elaborate a bit more?
    Check out this blog demoing the documents repository capabilities and read the official documentation here.
    I believe the public folder can fit for your needs.
    Regards,
    Eliel.
    Cloud Portal Development.

  • Changing a method in an EJB object without recompiling EJB-Clients

    Hi!
    I have 4 Web (JSP) applications using the same EJBs., deployed to a BEA Weblogic application server.I want to know if there is a way to change the code in a method in one of my EJB objects (no interface change) without recompiling and redeploying my EJB-clients and Web apps.
    Regards,
    Per - Chr.

    Hello,
    I have 4 Web (JSP) applications using the same EJBs.,
    deployed to a BEA Weblogic application server.I want
    to know if there is a way to change the code in a
    method in one of my EJB objects (no interface change)
    without recompiling and redeploying my EJB-clients and
    Web apps.You can change the EJB's without recompiling the clients as long as the interfaces and the classes used by both the EJB's and clients are not changed.
    For example, if you don't change the interfaces but change the exception implementation thrown by a method of the bean, then you have to recompile the clients with the new version of the exception class.
    Kexkey

  • How do I  call a DeleteAllQuery stored in the session object?

    Hi all,
    I have a DeleteAllQuery that I have stored in my session object by name (PURGE_IRLE):
    srvSession.addQuery(DaoConst.PURGE_IRLE, delq);
    I have RTFM:ed but the only description for deleteing that I could find delets individual objects. I couldn't find an example for DeleteAllQuery. :-(
    I set the reference class when I define the query but I'm confused by the getObjects() and setObjects() methods.
    Q1: When do I need to call them?
    Q2: How do I call this query?
    Q3: Which Session.executeQuery(...) should I use? (this relates to 1 & 2).
    Q4: How do I get back the number of rows deleted? execute returns an Object; can I assume it's an Integer containing the numbers of rows deleted?
    Many thanks in advance,
    Andrei Lenkei

    Ok, but this causes me some problems because:
    1) I can't really use SQL because I need a notExists subquery access on a TopLink object that represents a join (in the pre-TopLink version of the code the object was represented by a temporary table; I could put that whole select as a subquery to the subquery but that's not very elegant and would be quite inefective)
    2) This could be hundreds/thousands of row; wouldn't deleteing them 1-by-1 be extremly inefective?
    Isn't there a way i can call the DeleteAllQuery the same way TopLink would call it?
    Regards,
    Andrei Lenkei

  • Finding an EJB object. Web clients vs. Java clients

    From what I've read this is the process for a web client to find an EJB object: the client uses JDNI to find a reference to the EJBHome interface and then it uses the create method from this interface which makes the container to begin to work, creating an instance of the implementation class and an instance of the EJBObject interface, and returning a reference to the EJBObject, which will be used by the client to call the methods.
    Are there any differences if the client is a java application and not a web client?

    The Java Client talk to the server with random ports
    not 80. Gives me a headache. _*why?
    There's no need to get headaches about it, in fact no need to worry about it at all.
    Just have the JNDI services available so you can do the lookup (which might require opening a port (or more than one) on the firewall, but that's it.
    And that's no different between a standalone client and a web application client. Both need to do that JNDI lookup.

  • Problem in getting handle to EJB Object

    Hi All,
    I am getting following exception when i try to get handle on my ejb object.
    My Client Program:
    import synch.*;
    import javax.naming.*;
    import java.rmi.*;
    import javax.rmi.*;
    import javax.ejb.*;
    import java.io.*;
    public class SearlizeClient
         public static void main(String[] args) throws Exception
              Context ic = new InitialContext();
                   Object o = ic.lookup("NameBean"); // replace with YOUR JNDI name for the bean
                   NameHome nameHome = (NameHome) PortableRemoteObject.narrow(o, NameHome.class);
                   synch.Name obj1 = nameHome.create();
                   obj1.setName("Balaji");
                   Handle myHandle= obj1.getHandle();// Getting exception at this place
                   FileOutputStream out = new FileOutputStream("MyHandle.txt");
                   ObjectOutputStream s = new ObjectOutputStream(out);
                   s.writeObject(obj1);
                   s.flush();
                   out.close();
    I got following excetion when i try to get handle on EJBObject
    Dec 6, 2005 11:20:19 AM com.sun.corba.se.impl.encoding.CDRInputStream_1_0 read_value
    WARNING: "IOP00810257: (MARSHAL) Could not find class"
    org.omg.CORBA.MARSHAL: vmcid: SUN minor code: 257 completed: Maybe
    at com.sun.corba.se.impl.logging.ORBUtilSystemException.couldNotFindClass(ORBUtilSystemExcep
    tion.java:7756)
    at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1013
    at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:879)
    at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_abstract_interface(CDRInputStream_
    1_0.java:873)
    at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_abstract_interface(CDRInputStream_
    1_0.java:863)
    at com.sun.corba.se.impl.encoding.CDRInputStream.read_abstract_interface(CDRInputStream.java
    :269)
    at synch._Name_Stub.getHandle(Unknown Source)
    at SearlizeClient.main(SearlizeClient.java:20)
    Caused by: java.lang.ClassNotFoundException
    ... 7 more
    Exception in thread "main" java.rmi.MarshalException: CORBA MARSHAL 1398079745 Maybe; nested excepti
    on is:
    org.omg.CORBA.MARSHAL: vmcid: SUN minor code: 257 completed: Maybe
    at com.sun.corba.se.impl.javax.rmi.CORBA.Util.mapSystemException(Util.java:197)
    at javax.rmi.CORBA.Util.mapSystemException(Util.java:67)
    at synch._Name_Stub.getHandle(Unknown Source)
    at SearlizeClient.main(SearlizeClient.java:20)
    Caused by: org.omg.CORBA.MARSHAL: vmcid: SUN minor code: 257 completed: Maybe
    at com.sun.corba.se.impl.logging.ORBUtilSystemException.couldNotFindClass(ORBUtilSystemExcep
    tion.java:7756)
    at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1013
    at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:879)
    at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_abstract_interface(CDRInputStream_
    1_0.java:873)
    at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_abstract_interface(CDRInputStream_
    1_0.java:863)
    at com.sun.corba.se.impl.encoding.CDRInputStream.read_abstract_interface(CDRInputStream.java
    :269)
    at synch._Name_Stub.getHandle(Unknown Source)
    ... 1 more
    Caused by: java.lang.ClassNotFoundException
    ... 7 more
    Enviroment: This bean is hosted on Sun J2ee Appserver 8.0 and normal client prg is working fine .. But it is failing in getting handle
    Please suggest,
    Thanks in advance

    The only way is to create your own equivalent of HttpSessionContext.
    Its simple enough, just create a class that implements HttpSessionListener (responds to session creation, and destruction)
    You can get the sessions as they are created, and keep a global reference to them, and manipulate it as much as you like. In your case you would probably want to index the sessions by userId rather than sessionId for easy access.
    Good luck,
    evnafets

  • Transaction & non-EJB objects (helper)

    hi i have a question about transactional behavior of non-EJB objects. i'm
              using
              weblogic 6.0 sp1 with ejb 2.0.
              say i have a session bean which starts a container managed transaction. and
              it calls
              out to helper class A(non-EJB), and that helper class A get a connection and
              update
              some tables. after A returns, session bean calls helper class B(non-EJB) in
              the
              same transaction. B is supposed to update some other tables but it throw an
              user
              exception. would the transaction in the session bean be rolled back? would
              it
              also roll back the changes made by helper class A?
              thanks for any help,
              z
              

    Thanks Rob!
              "Rob Woollen" <[email protected]> wrote in message
              news:[email protected]...
              > Ziqiang Xu wrote:
              >
              > > hi i have a question about transactional behavior of non-EJB objects.
              i'm
              > > using
              > > weblogic 6.0 sp1 with ejb 2.0.
              > >
              > > say i have a session bean which starts a container managed transaction.
              and
              > > it calls
              > > out to helper class A(non-EJB), and that helper class A get a connection
              and
              > > update
              > > some tables.
              >
              > You must get the JDBC connection from a TxDataSource.
              >
              > > after A returns, session bean calls helper class B(non-EJB) in
              > > the
              > > same transaction. B is supposed to update some other tables but it
              throw an
              > > user
              > > exception. would the transaction in the session bean be rolled back?
              >
              > Merely throwing an exception from a helper class will not rollback the
              > transaction.
              >
              > Within an EJB, the best way to rollback a tx is to use the
              > EJBContext.setRollbackOnly method.
              >
              > So you could do something like this:
              >
              > session_bean_method() {
              >
              > try {
              > B.foo();
              > } catch (MyException e) {
              > ctx.setRollbackOnly();
              > throw e;
              > }
              >
              > }
              >
              > > would
              > > it
              > > also roll back the changes made by helper class A?
              > >
              >
              > If they are all within a single transaction, then yes. As I mentioned
              before,
              > make sure that you use a TxDataSource for all of your JDBC Connections.
              >
              > -- Rob
              >
              > >
              > > thanks for any help,
              > >
              > > z
              >
              

  • List of EJB object published in database

    how is it possible to list of EJB object published in database ?
    I'm using Oracle 8.1.7.
    Thanks

    Enterprise Manager --> DBA Pack --> Connect to JServer

  • One EJB object accessed by two clients.

    One client access a EJB object another client access the same EJB
    object, when the first client releases the ejb object, then second
    client loses data or gets null.
    Any body knows what is happening?
    Thanks

    hey,
    is this with StatefulSession Bean. I too am experiencing the same problem. When two users are trying to access the same bean the same time, one is returing null. This being a UserSession Bean, one user is getting the session object as null..
    Can anyone answer this problem....
    cheers,
    prasad.

  • Help me! About look up EJB object.

    I have deployed the ejb object on local PE 9(Sun Java System Application Server Platform Edition 9).
    When I use the following code to have a test, I will get a correct result.
    The classpath include (appserv-rt.jar) ect.
    public static void main(String[] args) {
         try{
              Properties props = System.getProperties();
              Context ctx = new InitialContext(props);
              Hello h = (Hello) ctx.lookup("java:comp/env/ejb/test/Hello");
              Hello h = (Hello) ctx.lookup("ejb/test/Hello");
              System.out.println(h.sayHello());
         }catch(Exception e){
              e.printStackTrace();
    The first question is that the real host ever is the localhost, whether I set the any host (props.put(Context.PROVIDER_URL,"iiop://192.46.57.78:3700");).
    Why?
    When I use the following code to have a test, I will get a incorrect result.
    public static void main(String[] args) {
         try{
              Properties props = System.getProperties();
              props.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.cosnaming.CNCtxFactory");
              props.put(Context.PROVIDER_URL,"iiop://localhost:3700");
              Context ctx = new InitialContext(props);
              Hello h = (Hello) ctx.lookup("java:comp/env/ejb/test/Hello");
              Hello h = (Hello) ctx.lookup("ejb/test/Hello");
              System.out.println(h.sayHello());
         }catch(Exception e){
              e.printStackTrace();
    The exception is :
    javax.naming.NameNotFoundException [Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0]
         at com.sun.jndi.cosnaming.ExceptionMapper.mapException(ExceptionMapper.java:44)
         at com.sun.jndi.cosnaming.CNCtx.callResolve(CNCtx.java:453)
         at com.sun.jndi.cosnaming.CNCtx.lookup(CNCtx.java:492)
         at com.sun.jndi.cosnaming.CNCtx.lookup(CNCtx.java:470)
         at javax.naming.InitialContext.lookup(InitialContext.java:351)
         at tests.HelloTest.main(HelloTest.java:30)
    Caused by: org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0
         at org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read(NotFoundHelper.java:72)
         at org.omg.CosNaming._NamingContextExtStub.resolve(_NamingContextExtStub.java:406)
         at com.sun.jndi.cosnaming.CNCtx.callResolve(CNCtx.java:440)
         ... 4 more
    Why?
    Please help me!
    Thanks!

    Sorry!
    Above:
    Hello h = (Hello) ctx.lookup("java:comp/env/ejb/test/Hello");
    The above (Hello h = (Hello) ctx.lookup("java:comp/env/ejb/test/Hello");) have deleted in right code.

  • Physical service to invoke Oracle stored procedure taking an object type

    Hello,
    I have some stored procedures in Oracle that take a complex object type as parameters. Can I invoke these directly from ODSI? If so, how do I create the physical service for this?
    Example:
    CREATE OR REPLACE TYPE "CCSUSERDV"."TEST_TYPE" as object (
    name varchar2(80),
    text varchar2(1000),
    some_other number
    CREATE OR REPLACE PACKAGE CCSUSERDV.TEST
    as
    function joinText(inVal in TEST_TYPE) return varchar2;
    end;
    CREATE OR REPLACE PACKAGE BODY CCSUSERDV.TEST
    AS
    FUNCTION joinText(inVal in TEST_TYPE) return varchar2 AS
    BEGIN
    if (inVal.text is not null) then
    return inVal.name || '-' || inVal.text;
    else
    return inVal.name || ':' || inVal.some_other;
    end if;
    END;
    END;
    I Want to be able to call TEST.joinText from OSDI. I know I could create a separate function that takes all the attributes of my object, but it would be considerably more convenient to implement in terms of the object instead, because there are several functions that take the same set of about 20 fields as a request.
    Thank you!!
    Jeff

    (1) Your best bet is to create a wrapper stored procedure that takes simple arguments and constructs the object, then calls your stored procedure with the object. You call the wrapper stored procedure from ODSI. JPublisher can create wrapper stored procedures for you.
    (2) If it is impossible for you to create a wrapper stored procedure in the database, you can create a physical data service from the existing stored procedure. You will notice that the function in the physical data service will have simple arguments (not the object), and if you try to execute it, it will fail. It's up to you to write an anonymous pl/sql block that wraps the existing stored procedure (basically what you would have had to write for (1)), and edit the metadata in the physical ds - where it has the name of the stored procedure, replace the name with your anonymous PL/SQL block.
    Below is what the CREATE_BATCH stored procedure from Oracle Process Manufacturing would look like. (it also has CURSOR args - so it is uglier than just Objects). It also demonstrates that you need to do a conversion of boolean args.
    xquery version "1.0" encoding "WINDOWS-1252";
    (::pragma xds <x:xds xmlns:x="urn:annotations.ld.bea.com" targetType="t:CERTIFY_BATCH" xmlns:t="ld:JdbcTest4DataServices/opm/CERTIFY_BATCH">
    <creationDate>2007-01-14T20:55:37</creationDate>
    <relationalDB dbVersion="10" dbType="oracle" name="oracleXeDataSource"/>
    </x:xds>::)
    declare namespace f1 = "ld:JdbcTest4DataServices/opm/CERTIFY_BATCH";
    import schema namespace t1 = "ld:JdbcTest4DataServices/opm/CERTIFY_BATCH" at "ld:JdbcTest4DataServices/opm/schemas/CERTIFY_BATCH.xsd";
    (::pragma function <f:function xmlns:f="urn:annotations.ld.bea.com" kind="read" nativeName="DECLARE p_batch_header gme_batch_header%rowtype; x_batch_header gme_batch_header%rowtype; x_unallocated_material gme_api_pub.unallocated_materials_tab; TYPE rc IS REF CURSOR; PROCEDURE to_ref_cursor(x IN gme_api_pub.unallocated_materials_tab, ref_cursor IN OUT rc) IS l_data bea_unallocated_materials_tab := bea_unallocated_materials_tab(); BEGIN FOR i IN x.FIRST .. x.LAST LOOP l_data.EXTEND; l_data(i) := bea_unallocated_materials_type(x(i).batch_id, x(i).batch_no, x(i).material_detail_id, x(i).line_type, x(i).line_no, x(i).item_id, x(i).item_no, x(i).alloc_qty, x(i).unalloc_qty, x(i).alloc_uom); END LOOP; OPEN ref_cursor FOR SELECT * FROM TABLE ( CAST (l_data AS bea_unallocated_materials_tab) ); END; FUNCTION to_boolean(n IN NUMBER) RETURN BOOLEAN IS BEGIN IF (n = 0) THEN RETURN FALSE; ELSE RETURN TRUE; END IF; END to_boolean;BEGIN p_batch_header.batch_id := ?; p_batch_header.batch_no := ?; p_batch_header.plant_code := ?; p_batch_header.batch_type := ?; p_batch_header.actual_start_date := ?; p_batch_header.actual_cmplt_date := ?; gme_api_pub.certify_batch( p_api_version => ?, p_validation_level => ?, p_init_msg_list => to_boolean(?), p_commit => to_boolean(?), x_message_count => ?, x_message_list => ?, x_return_status => ?, p_del_incomplete_manual => to_boolean(?), p_ignore_shortages => to_boolean(?), p_batch_header => p_batch_header, x_batch_header => x_batch_header, x_unallocated_material => x_unallocated_material ); ? := x_batch_header.batch_id; ? := x_batch_header.batch_no; ? := x_batch_header.plant_code; ? := x_batch_header.batch_type; ? := x_batch_header.actual_start_date; ? := x_batch_header.actual_cmplt_date; ? := x_batch_header.plan_start_date; ? := x_batch_header.plan_cmplt_date; ? := x_batch_header.due_date; ? := x_batch_header.recipe_validity_rule_id; ? := x_batch_header.wip_whse_code; to_ref_cursor(x_unallocated_material, ?);END;" nativeLevel2Container="" nativeLevel3Container="" style="storedProcedure">
    <params xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdt="http://www.w3.org/2004/07/xpath-datatypes" xmlns:pn1="ld:JdbcTest4DataServices/opm/CERTIFY_BATCH" >
    <param name="BATCH_ID" kind="in" xqueryType="xs:string" nativeTypeCode="12" nativeType="VARCHAR2"/>
    <param name="BATCH_NO" kind="in" xqueryType="xs:decimal" nativeTypeCode="3" nativeType="NUMBER"/>
    <param name="PLANT_CODE" kind="in" xqueryType="xs:string" nativeTypeCode="12" nativeType="VARCHAR2"/>
    <param name="BATCH_TYPE" kind="in" xqueryType="xs:decimal" nativeTypeCode="3" nativeType="NUMBER"/>
    <param name="ACTUAL_START_DATE" kind="in" xqueryType="xs:dateTime" nativeTypeCode="93" nativeType="DATE"/>
    <param name="ACTUAL_CMPLT_DATE" kind="in" xqueryType="xs:dateTime" nativeTypeCode="93" nativeType="DATE"/>
    <param name="P_API_VERSION" kind="in" xqueryType="xs:decimal" nativeTypeCode="3" nativeType="NUMBER"/>
    <param name="P_VALIDATION_LEVEL" kind="in" xqueryType="xs:decimal" nativeTypeCode="3" nativeType="NUMBER"/>
    <param name="P_INIT_MSG_LIST" kind="in" xqueryType="xs:integer" nativeTypeCode="3" nativeType="NUMBER"/>
    <param name="P_COMMIT" kind="in" xqueryType="xs:integer" nativeTypeCode="3" nativeType="NUMBER"/>
    <param name="X_MESSAGE_COUNT" kind="out" xqueryType="xs:decimal" nativeTypeCode="3" nativeType="NUMBER"/>
    <param name="X_MESSAGE_LIST" kind="out" xqueryType="xs:string" nativeTypeCode="12" nativeType="VARCHAR2"/>
    <param name="X_RETURN_STATUS" kind="out" xqueryType="xs:string" nativeTypeCode="12" nativeType="VARCHAR2"/>
    <param name="P_DEL_INCOMPLETE_MANUAL" kind="in" xqueryType="xs:integer" nativeTypeCode="3" nativeType="NUMBER"/>
    <param name="P_IGNORE_SHORTAGES" kind="in" xqueryType="xs:integer" nativeTypeCode="3" nativeType="NUMBER"/>
    <param name="BATCH_ID" kind="out" xqueryType="xs:string" nativeTypeCode="12" nativeType="VARCHAR2"/>
    <param name="BATCH_NO" kind="out" xqueryType="xs:decimal" nativeTypeCode="3" nativeType="NUMBER"/>
    <param name="PLANT_CODE" kind="out" xqueryType="xs:string" nativeTypeCode="12" nativeType="VARCHAR2"/>
    <param name="BATCH_TYPE" kind="out" xqueryType="xs:decimal" nativeTypeCode="3" nativeType="NUMBER"/>
    <param name="ACTUAL_START_DATE" kind="out" xqueryType="xs:dateTime" nativeTypeCode="93" nativeType="DATE"/>
    <param name="ACTUAL_CMPLT_DATE" kind="out" xqueryType="xs:dateTime" nativeTypeCode="93" nativeType="DATE"/>
    <param name="PLAN_START_DATE" kind="out" xqueryType="xs:dateTime" nativeTypeCode="93" nativeType="DATE"/>
    <param name="PLAN_CMPLT_DATE" kind="out" xqueryType="xs:dateTime" nativeTypeCode="93" nativeType="DATE"/>
    <param name="DUE_DATE" kind="out" xqueryType="xs:dateTime" nativeTypeCode="93" nativeType="DATE"/>
    <param name="RECIPE_VALIDITY_RULE_ID" kind="out" xqueryType="xs:string" nativeTypeCode="12" nativeType="VARCHAR2"/>
    <param name="WIP_WHSE_CODE" kind="out" xqueryType="xs:string" nativeTypeCode="12" nativeType="VARCHAR2"/>
    <param name="X_UNALLOCATED_MATERIAL" kind="out" xqueryType="pn1:X_UNALLOCATED_MATERIAL_ROW" nativeTypeCode="-10" nativeType="REF CURSOR"/>
    </params>
    </f:function>::)
    declare function f1:CERTIFY_BATCH($p_batch_header_batch_id as xsd:string, $p_batch_header_batch_no as xsd:decimal, $p_batch_header_plant_code as xsd:string, $p_batch_header_batch_type as xsd:decimal, $p_batch_header_actual_start_date as xsd:dateTime, $p_batch_header_actual_cmplt_date as xsd:dateTime, $p_api_version as xsd:decimal, $p_validation_level as xsd:decimal, $p_init_msg_list as xsd:integer, $p_commit as xsd:integer, $p_del_incomplete_manual as xsd:integer, $p_ignore_shortages as xsd:integer) as schema-element(t1:CERTIFY_BATCH) external;

  • EJB object factory

     

    Declare the factory class as a startup class. In the main() method, create a new initial context and bind a new instance of the factory class into the jndi tree under an agreed on name. Youi client code should look for the factory calss under the agreed on name.
    Hope that helps.
    Narendra Pasuparthy wrote:
    Hi Eduardo,
    Thanks for looking into my problem, I have been trying to do this thing for
    the last 2 weeks and you help comes as a new sign of life to me.
    Anyway i understand the problem better now, but i am still far away from
    having to solve it. you say something about adding the object factory to the
    JNDI tree
    What you can do is add your object factory to the jndi tree. Your >bean
    could look it up, etc.How can i do this, i presume that when you say jndi tree you ae referring to
    the JNDI tree provided by the weblogic server; right?
    If you can shed more light on how i can add my object factory to the JNDI
    tree and how i can look it up i would appreciate your help.
    Looking forward to hearing form you soon.
    Bye,
    Naren
    From: [email protected] (Eduardo Ceballos)
    To: narendra <[email protected]>
    Subject: Re: EJB object factory
    Date: Mon, 21 Aug 2000 08:42:34 -0700
    MIME-Version: 1.0
    Received: from [63.96.160.4] by hotmail.com (3.2) with ESMTP id
    MHotMailBB6A99B0002AD820F39D3F60A0049AF50; Mon Aug 21 08:45:56 2000
    Received: from san-francisco.beasys.com (san-francisco.beasys.com
    [192.168.9.10])by beamail.beasys.com (8.9.1b+Sun/8.9.1) with ESMTP id
    IAA08176for <[email protected]>; Mon, 21 Aug 2000 08:45:54 -0700 (PDT)
    Received: from ashbury.weblogic.com (ashbury.beasys.com [172.17.8.3])by
    san-francisco.beasys.com (8.9.1b+Sun/8.9.1) with ESMTP id IAA13707for
    <[email protected]>; Mon, 21 Aug 2000 08:46:05 -0700 (PDT)
    Received: from weblogic.com ([192.168.11.197]) by ashbury.weblogic.com
    (Post.Office MTA v3.5.3 release 223 ID# 0-53833U200L200S0V35)
    with ESMTP id com for <[email protected]>; Mon, 21 Aug 2000
    09:03:01 -0700
    From [email protected] Mon Aug 21 08:47:42 2000
    Message-ID: <[email protected]>
    X-Mailer: Mozilla 4.73 [en] (WinNT; I)
    X-Accept-Language: en
    Newsgroups: weblogic.developer.interest.rmi-iiop
    References: <[email protected]>
    There is no provision for a generic object factory in the public api, and
    none is supported.
    What you can do is add your object factory to the jndi tree. Your bean
    could look it up, etc. I would urge you to
    make sure that there are appropriate acls on the factory, for obvious
    security reasons.
    narendra wrote:
    My problem is that i want to invoke a service running on another APPserver form an EJB bean,
    the other app server provides some client APIwhich i can use and invokethe service. Due to the
    security restriction in EJB container i was not able to do this, theapproach i am thinking
    about is establishing an object factory to create an object of theother app server client
    class and use that from the bean.
    the weblogic server seems to handle,"javax.sql.DataSource,""javax.jms.QueueConnectionFactory,"
    "javax.jms.TopicConnectionFactory" or "java.net.URL" how can it supportgeneric object factories, since I
    have a obect factory that does not construct any of the objects usingthe weblogic supported object
    factory.
    Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

Maybe you are looking for