Calling business delegate object from client

Hi guys,
I want to know how can I use Business Delegate Pattern in my client program(e.g JSP for that matter). I would really be thankful if u plz illustrate ur point thru code.
One more doubt....
Can a Normal Java Bean be a Business Delegate Object??
What I am trying to say is,
In a typical J2EE application architecture which uses MVC design pattern as follows:
(JSP--->Java Bean--->Session Bean--->Entity Bean-->DB)
Can I say the java bean used above is acting as a "Business Delegate Object", coz business delegate object lets u to decouple the presentation and business tier, which is what the above java bean is also doing??? Any comments on this????
Thanx in Advance
Jam

Hi buddy,
Tx for ur response.So as per to the architecture as i have mentioned in my first query(i.e JSP-->Java Bean--->Session Bean--->>Entity Bean-->DB)
Sould i introduce a Business Delegate Object somewhere in between JavaBean and Session Bean. This business delegate object will be looking for the seesion facade used above, and java bean will be acting as a client for Business Delegate Object. Am i correct here???? Plz clarify.
Thanx n Regards
Jam

Similar Messages

  • How can I call a COM object from a PL/SQL CODE

    Hi everyone,
    Does anyone know how to call a COM object from a stored procedure in oracle.
    a sample of code
    please help,
    Hilaire

    Are you familiar with external procedures? Basically, you can expose functions exported by a shared library (i.e. a DLL on Windows) to the Oracle database. My assumption is that you'd probably need to write a wrapper DLL around the COM object, since I believe you can only pass fundamental data types back and forth (i.e. no object references). You'd expose the method(s) of that wrapper DLL to the database via external procedures.
    Justin
    Distributed Database Consulting, Inc.
    www.ddbcinc.com/askDDBC

  • How to call a COM object from an Oracle Form?

    Hi All,
    Pls advice. How to call a COM object from an Oracle Form?
    Thanks.

    try asking the "Form" forum

  • Sending an object from client to server always on button press

    What I need is to send an object from client to server but I need to make server wait until another object is sent. What I have is the JFrame where you put the wanted name and surname, then you create a User object with these details and on button press you send this object to the server. I just can't hold the connection because when I send the first object, server doesn't wait for another button click and throws EOFexception. Creating the while loop isn't helpfull as well because it keeps sending the same object again and again. The code is here
    public class ClientFrame extends JFrame {
        private JButton btnSend;
        private JTextField txfName;
        private JTextField txfSurname;
        public ClientFrame() {
            this.setTitle(".. ");
            Container con = this.getContentPane();
            con.setLayout(new BorderLayout());
            txfName = new JTextField("name");
            txfSurname = new JTextField("surname");
            btnSend = new JButton(new AbstractAction() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    SSLSocketFactory f =
                            (SSLSocketFactory) SSLSocketFactory.getDefault();
                    try {
                        SSLSocket c =
                                (SSLSocket) f.createSocket("localhost", 8888);
                        c.startHandshake();
                        OutputStream os = c.getOutputStream();
                        ObjectOutputStream oos = new ObjectOutputStream(os);
                        InputStream is = c.getInputStream();
                        ObjectInputStream ois = new ObjectInputStream(is);
                        boolean done = false;
                        while (!done) {
                            String first = txfName.getText();
                            String last = txfSurname.getText();
                            User u = new User();
                            u.setFirstName(first);
                            u.setLastName(last);
                            oos.reset();
                            oos.writeObject(u);
                            String str = (String) ois.readObject();
                            if (str.equals("rcvdOK")) {
                                System.out.println("received on the server side");
                            } else if (str.equals("ERROR")) {
                                System.out.println("ERROR");
                        //oos.writeObject(confirmString);
                        oos.close();
                        os.close();
                        c.close();
                    } catch (ClassNotFoundException ex) {
                        Logger.getLogger(ClientFrame.class.getName()).log(Level.SEVERE, null, ex);
                    } catch (IOException ex) {
                        System.err.println(ex.toString());
            btnSend.setText("send object");
            con.add(btnSend, BorderLayout.PAGE_START);
            con.add(txfName, BorderLayout.CENTER);
            con.add(txfSurname, BorderLayout.PAGE_END);
            this.pack();
            setSize(200, 150);
            setVisible(true);
    public class TestServer {
        public static void main(String[] args) {
            try {
                KeyStore ks = KeyStore.getInstance("JKS");
                ks.load(new FileInputStream(ksName), ksPass);
                KeyManagerFactory kmf =
                        KeyManagerFactory.getInstance("SunX509");
                kmf.init(ks, ctPass);
                SSLContext sc = SSLContext.getInstance("TLS");
                sc.init(kmf.getKeyManagers(), null, null);
                SSLServerSocketFactory ssf = sc.getServerSocketFactory();
                SSLServerSocket s = (SSLServerSocket) ssf.createServerSocket(8888);
                printServerSocketInfo(s);
                SSLSocket c = (SSLSocket) s.accept();
                InputStream is = c.getInputStream();
                ObjectInputStream ois = new ObjectInputStream(is);
                OutputStream os = c.getOutputStream();
                ObjectOutputStream oos = new ObjectOutputStream(os);
                boolean done = false;
                User u;
                  while(!done){
                    u = (User) ois.readObject();
                    String confirmString = "rcvdOK";
                    String errorString = "ERROR";
                    if (u != null) {
                        System.out.println(u.getFirstName() + " " + u.getLastName());
                        oos.writeObject(confirmString);
                    } else if (u == null) {
                        oos.writeObject(errorString);
                is.close();
                s.close();
                c.close();
            } catch (Exception e) {
                    System.err.println(e.toString());
    }Thanks for any help, btw this doesnt need to be via ssl, the problem would be the same using only http. Please anyone help me:)
    Edited by: Vencicek on 7.5.2012 2:19
    Edited by: EJP on 7/05/2012 19:53
    Edited by: Vencicek on 7.5.2012 3:36

    Current code fails because it's sending still the same entity again(using while loop)No it's not. You are creating a new User object every time around the loop.
    which makes the system freezeWhich means that you are executing network code in the event thread. Don't do that, use a separate thread. At the moment you're doing all that sending inside the constructor for ClientFrame which is an even worse idea: you can never get out of there to the rest of your client program. This is a program design problem, not a networking problem.
    and doesn't allow me to set new parameters of the new entityI do not understand.
    I need to find a way to keep Server running even when the client doesn't send any data and wait until the client doesnt press the send button again to read a new object.That's exactly what happens. readObject() blocks until data is received.

  • Calling (VB)activex object from JSP

    Hi,
    I am trying to call a ActiveX object from JSP using the ActiveXObject method in javascript. I have a dll filed named LPMSFunctions.dll which is registered and is being passed as an argument to the ActiveXObject method. Below is the code i am trying to execute..
    <html>
    <head>
    <title>Script Example</title>
    </head>
    <body>
    <br><br>
    <P align="center">
    <form action="" method="post">
    <script language="JavaScript">
    function comEventOccured()
    try{
    var myobject;
    myobject = new ActiveXObject("LPMSFunctions72.LPFunctions72");
    alert("Inside LPMSFunction72");
    alert(myobject.GetDocPath());
    catch(e)
    alert("Error");
    </script>
    </form>
    </body>
    </html>When i write the above code and save it as an html file it works fine..the activex object is created and the methods are called , but when i copy the same code to a file and save it as jsp file under webapps folder under tomcat it doesnt work and reports a javascript error with the error being:
    Automation server cant create the object at line :
    var SSOObj = new ActiveXObject("LPMSFunctions72.LPFunctions72");
    Please suggest how can I solve the problem. Your help would be sincerely appreciated.
    Thanks
    shravan

    You want to use the Variant to Data node, wiring in an ActiveX constant configured to the interface type you want.
    Brian Tyler
    http://detritus.blogs.com/lycangeek

  • How to send multiple objects from Client to Server

    Hi
    I have a simple Client - Server architecture. I am trying to send 5 objects from Client to the Server which the server would operate on.
    In the past I've used PrintWriter to pass Strings from Client to Server but now when I am dealing with multiple Objects and PrintWriter not allowing sending of Arrays or ArrayList, how can I send these from the Client to the Server? What would be a good writer to use for this purpose?
    Thanks!

    Thanks, I am looking into ObjectOutputStream but from the API it appears I can only send 1 object at a time. I need to send 5 objects per transaction and then send the next group of 5 objects for another transaction.
    Could you clarify some more on how to put these objects together as a single Object perhaps?
    Thanks

  • How can I call a java object from Web dynpro ABAP application?

    I made Web dynpro ABAP application and posted it to SAP EP.
    For certain business purpose, we need to call external 3rd party java object using 3rd party's java api in Web dynpro application.
    Is there anybody who experienced this kind of java interface issue?
    I know Web dynpro Java environment can fully support this kind of requirement. but regarding Web dynpro ABAP, I couldn't find any clue for this.
    Any comment or suggestion would be greatly appreciated.
    Thanks,
    Raymond, ABAP Consultant

    if you have jco configured, then you can make calls to java api from ABAP .
    check out this weblog.
    /people/gregor.wolf3/blog/2004/08/26/setup-and-test-sap-java-connector-outbound-connection
    Raja

  • Installing the Business Content Objects from R/3 in to BW

    From R/3 system with RSA5 (Installation DataSource from Business Content), I have selected 0PF_FUND_ATTR (Pension Fund in Personnel Management) and clicked the 'Transfer DataSource' and it was successful. Then I have logged on to BW and 'Replicated the DataSource' for Pension Fund Master data and I could see my new DataSource '0PF_FUND_ATTR' after the replication under R/3 Client Source System. I went to the list of Info Objects (AWB -->Business Content --> Object Types --> Info Objects --> Selection --> Input help for Metadata) and I didn't find my new 0PF_FUND_ATTR in the list. If I find it then could click the 'Transfer Selections' button at the bottom and I could 'INSTALL' it afterwards.
    Why I am not able to see '0PF_FUND_ATTR' in the list of InfoObjects and what was the problem. Could you please help me. Thanks in advance.

    Hi Venkat,
    Please try not to double post your question. It is the same group of people on all forums. I have given you a detailed answer on the other question, please look at it.

  • Calling a java object from a store procedure

    I have written a translation object in java that takes a $en_var in and returns its path.
    What I need to do is call that object from a PL/SQL store procedure. All the examples I have seen treat the store procedure as a wrapper around the java object.
    But in my store procedure calling the object is only one part of the procedures role:
    The store procedure code is :
    CREATE OR REPLACE PROCEDURE WRITE_TO_FILE(in_file_name IN VARCHAR, in_en_var IN VARCHAR)
    file_handle UTL_FILE.FILE_TYPE;
    file_location VARCHAR2(50)
    BEGIN
    I need to be able to call the javaobject translation here
    file_location = translation.translatePath(in_en_var)
    file_handle := UTL_FILE.FOPEN(file_location, in_file_name, 'w');
    dbms_output.put_line ('input file name opened file name' ||in_file_name ||'-->' ||in_file_location);
    UTL_FILE.put_line(file_handle,'Hello Tony);
    UTL_FILE.FCLOSE(file_handle);
    END WRITE_TO_FILE;
    I call the java class method translatePath with a string the en_var which returns the path as a string which is then passed as a parameter to UTL_FILE.FOPEN.
    Thanks for any help
    Tony

    No Longer the problem

  • [iPhone] Call app delegate function from view controller

    I'm using the app delegate to manage the high scores for my iPhone game. I have a function in the app delegate called something like "getAString" which I'd like to call from a view controller. I tried:
    [[[UIApplication sharedApplication] delegate] getAString];
    It works but gives me a warning "getAString not found in protocol(s)" and "no -getAString method found". I assume this is because the application object thinks the delegate only implements the delegate protocol methods and doesn't know about any custom methods. Is there a different/better way to do this or a way to get rid of the warning?

    jmzorko wrote:
    I think you just need a simple cast:
    [((YourAppDelegate *)[[UIApplication sharedApplication] delegate]) getAString];
    ... that is, if I grok your problem correctly
    I have a similar problem, with this twist: the selector call is in shared-code and, hence, the [UIApplication sharedApplication] isn't of a known type. It is only known that it implements the shared callback and/or the myProtocol.
    Coming from a Java background, I'd do something like this:
    [((YourProtocol *)[[UIApplication sharedApplication] delegate]) getAString];
    But, of course, in Obj-C, protocols aren't object-types, and objects don't "inherit" from protocols. So, what's the similar thing that I want to do, here?
    Thanks!

  • Calling a perl programme from client java programme

    Hello
    I have an application with client code in java. On server side resides perl script to which my client java is dealing with.
    The server is linux debian distro while client is window.
    In actual processing I am uploading file(with specific format) from my java client application to server.
    After all the processing at server sideI am getting CVS file on my client machine. Now all this process is working smoothly except in following case.....
    The above application is developed for japanese clients. So in this application the folder names containing the files on client machine are in japanese. Now there are some cases when the folder names contain the metacharacters for linux. In this case when I submit the whole path of file, I want to upload then due to this metacharacters I think the command for submitting the file to perl is not able to execute properly on the linux server machine. So in that case my application hangs.................
    I am really looking for any solution for above problem...................
    Thanks in advance...........
    Pasi

    Convert what?Definitey I want to convert file/path
    name............................
    If the file/path name then replace every character
    (not byte) that has a value outside of the range of
    valid characters. You can just abritrary choose a
    range like [A-Za-z0-9_]. Replace each character
    either with a underscore or an 'escaped' value like a
    char whose hex value is c900 would produce a new value
    of "_Zxc900"As you have written above I have to just find the
    characters outside
    the valid range. But here the problem is when
    I submit the file/path from java client programme to linux server
    I am submitting it in japanese so at that time I am not able to
    understand how to check the characters outside valid
    range.
    Is the client in java. All strings in java are in unicode. So if you use toCharArray() you get a UTF16 representation. Any character above 128 is suspect. And some characters below 128 are suspect. The range I gave above is below 128 and can be used to filter for the others.
    So while submitting the file/path to server do I have to first convert
    it into server compatible charset. Then to check for
    unvalid characters....
    Is it the right procedure..................
    Would you please elaborate on this issue...........
    Hope this co-operation from you.Pseudo code
    - Use toCharArray()
    - For each char in the array.
    ---- Is it in the range? Then leave it.
    ---- Is it outside the range? Then convert it.

  • Permission problem calling a java object from a store procedure

    When I run my store procedure
    CREATE OR REPLACE PACKAGE BODY confirms_write_to_file
    AS
    FUNCTION translate(in_en_var in VARCHAR2)
    RETURN VARCHAR2
    AS LANGUAGE JAVA
    NAME 'translate.translatePath(java.lang.String) return java.lang.String';
    PROCEDURE write_to_file(in_file_name IN VARCHAR, in_en_var IN VARCHAR)
    IS
    file_handle               UTL_FILE.FILE_TYPE;
    file_location VARCHAR2(50);
    BEGIN
    file_location := translate(in_en_var);
    dbms_output.put_line ('opened file location' ||file_location);
    END write_to_file;
    END confirms_write_to_file;
    I get the following error:
    exec confirms_write_to_file.write_to_file('zzzz','$RIMS_LOG');
    SQL> exec confirms_write_to_file.write_to_file('zzzz','$RIMS_LOG');
    Exception java.security.AccessControlException: the Permission
    (java.io.FilePermission <<ALL FILES>> execute) has not been granted by
    dbms_java.grant_permission to
    SchemaProtectionDomain(RIMS|PolicyTableProxy(RIMS))
    opened file locationProcess problem
    PL/SQL procedure successfully completed.
    When I try to to grant myself the permissions
    begin
    dbms_java.grant_permission('rims','java.io.FilePermission','*','execute');
    dbms_java.grant_permission('rims', 'java.lang.RuntimePermission', '*','writeFileDescriptor' );
    end;
    I get the following Error:
    oracle.aurora.vm.IdNotFoundException: rims is not a user or role
    at oracle.aurora.rdbms.DbmsRealm.getId(DbmsRealm.java)
    at oracle.aurora.rdbms.DbmsRealm.getId(DbmsRealm.java)
    at
    oracle.aurora.rdbms.security.PolicyTableManager.findAll(PolicyTableManager.java)
    at oracle.aurora.rdbms.security.PolicyTableManager.find(PolicyTableManager.java)
    at
    oracle.aurora.rdbms.security.PolicyTableManager.activate(PolicyTableManager.java
    at
    oracle.aurora.rdbms.security.PolicyTableManager.grant(PolicyTableManager.java)
    begin
    ERROR at line 1:
    ORA-29532: Java call terminated by uncaught Java exception:
    oracle.aurora.vm.IdNotFoundException: rims is not a user or role
    ORA-06512: at "SYS.DBMS_JAVA", line 0
    ORA-06512: at line 2
    My java code is as follows
    import java.io.*;
    import java.util.*;
    class translate
         public static String translatePath(String envar)
              Runtime rt = Runtime.getRuntime();
              int bufSize = 4096;
              byte buffer[] = new byte[bufSize];
              String path = null;
              Process p = null;
              int len = 0;
              try
                   p = rt.exec("echo "+envar);
                   BufferedInputStream bis = new BufferedInputStream(p.getInputStream());
                   while ((len = bis.read(buffer, 0, bufSize)) != -1)
                        System.out.write(buffer, 0, len);
                   path = new String(buffer);
                   p.waitFor();
              catch(Exception e)
                   System.out.println("Exception "+e);
                   return "Process problem ";
              return path;

    Tony,
    I answered this very same question that you posted at the JavaRanch forum.
    Good Luck,
    Avi.

  • Procedure to Call Workflow Object from ABAP program in Se38

    Hi All,
    I have one scenario like i have to call one Workflow object from ABAP program in SE38.The scenario is like below.....
    I have to select some records from database table.For example there are 100 records in the internal table.
    For all that records i have to invoke Workflow for getting approval from the authorized persons. Once Approval has come to program, It will post one document in SAP and process ends.
    Please suggest me how to move forward with this scenario.
    Regards
    Manas Ranjan Panda

    Hi,
    So you want to start a workflow from an ABAP, if an event exists for that particular workflow then the best way is to use fm SAP_WAPI_CREATE_EVENT,
    to start a workflow from an ABAP you can use fm SAP_WAPI_START_WORKFLOW.
    Kind regards, Rob Dielemans

  • Call view object from ViewController [SOLVED]

    I'm using a valueChangeListener method in a managed bean, which I'd like to use to call a method on a view object. How can I call the view object from a managed bean class?
    Regards

    Maik,
    It is best practice to create a method on your application module, and have this method manipulate VO's and call VO methods.
    See section 8.5.3.1 in ADF Developers Guide for more info o calling an AM method from a managed bean:
    http://download-west.oracle.com/docs/html/B25947_01/bcservices005.htm#sthref673
    Please use the JDeveloper forum in the future for question like this, that are not related to JHeadstart.
    Steven Davelaar,
    Jheadstart team.

  • Calling inactive version of ABAP object from Java

    Hello,
    When I call an ABAP object from Java Program which version of ABAP object is called inactive or active ?
    Is there a mechanism to call the current inactive version or any other previous inactive /active versions ?
    Regards,
    Tarun

    Only the "active" version of ABAP code is active and runnable.
    You cannot run inactive versions. Like you have to compile a .java file to a .class file o make it runnable in the JVM.

Maybe you are looking for

  • Excel file upload restriction

    Dear, I have developed a object which upload any type of file( mainly excel file ) form desktop. Now i want to restrict user to upload the excel file , if that file is open in desktop. Please give me idea how i ll solve this issue ?????? Thanks & Reg

  • Program for uploading Statistical Key Figure  KK01 Stattistical Values KB31

    Hi , I need a Program through which we can upload statistical kay figure and statistical key figure values data any one who worked on this specific requirement please send the coding Moderator message: this is not your code factory, please do some ow

  • Almost deleted my Time Machine backup

    This is my very first post so I might be missing something. I have an external disk for Time Machine. I made a manual backup on Dec 28 and I wanted to delete one particluar file, so I right-clicked it and selected "Delete Backup", which was a WRONG b

  • Textauswahl in CC nun stockend langsam und unflüssig // Exportieren-Dialogfenster anders?

    Hi Leute, dies ist mein erstes Posting in diesem Forum. Seit dem Update auf CC (Windows-Version) ist doch einiges aufgefallen. So zum Beispiel folgendes: Wenn ich jetzt durch Mehrfachklick Text markiere ist die Auswahl sehr stockend und fühlt sich an

  • CS4: PProHeadless crash in TitleCharacterFactory.dll - unable to render

    Hey, guys. I've spent the better part of the morning searching the forum and it appears that pproheadless crashes are not uncommon. That said, I've not seen anything in discussions yet that leads to a solution, but I may have missed something. So, he