How to send a Connection Object via CORBA

Hi.
I've got a question.
How can I send a java.sql.Connection object
using CORBA to a client? Tried to use a class
MyConnection extending org.omg.CORBA.portable.ObjectImpl
as a wrapper class. Didn't work.
When a request was invoked for a Connection,
no object was send. On client side an error occured:
code 202 completed:maybe.
In the IDL we used:
     typedef Object MyConnection;
     interface ConnectionPool{
          MyConnection getCon();
          void freeCon(inout MyConnection c);
We were suggested to use structures. But ain't it
inventing java again?
Can anyone help us?
Thx anyway.

Try inserting it into an Any object and sending the any object over the IDL, the client can then extract the connection object.
You might have to typedef the Connection object in the IDL to generate the helper class.
/P/

Similar Messages

  • Sending an InetAddress-object via udp

    hi there!
    i'm developing a videostream server/client application. client is an applet. what i want to do is this:
    since an applet has to be signed in order to perform dns-lookups, i want to work around that.
    since the applet has to request the stream anyway and therefore connects the server sending udp-
    packets, my idea was to let the server send back the clients IP/hostname as an InetAddress-object
    inside a udp packet.
    i tried the following:
    info: byte[] buf = new byte[256];
    on server:
    InetAddress address = packet.getAddress();
    buf = address.getAddress();
    packet = new DatagramPacket(buf, buf.length, address, port);
    socket.send(packet);
    on client:
    socket.receive(packet);
    byte[] temp = packet.getData();
    source = InetAddress.getByAddress(temp);
    System.out.println(source.toString());
    the system.out returns this: ı�A)
    or other unreadable stuff, depending on the ip-address of the client.
    i think, this has something to do with the conversion to/from bytearray, doesn't it?
    can anyone show me how to send an InetAddress-object so that i get an
    InetAddress-object out at the client side?
    thanks in advance!
    you can earn some bucks, too!
    greets
    honfrek

    hi there!
    thanks for your help. i got it figured out now.
    now it works like this:
    on server:
    InetAddress address = packet.getAddress();
    buf = address.getAddress();
    byte[] newbuf = new byte[buf.length];
    newbuf = buf;
    packet = new DatagramPacket(newbuf, newbuf.length, address, port);
    socket.send(packet);
    on client:
    byte[] newbuf = new byte[4];
    packet = new DatagramPacket(newbuf,newbuf.length);
    socket.receive(packet);
    source = InetAddress.getByAddress(packet.getData());
    i made 2 mistakes:
    - i converted the InetAddress to a string
    - the length of the byte[] was too big. i had a bunch of zeroes at the end

  • How to send sms from iPad via iphone

    How to send sms from iPad via iphone?

    You don't easily.
    The pad, with I message turned on, will send text like messages to any other ios5 user that has I message turned on.
    The pad is not a phone, and does not have the radio to send 'real' SMS messages, which use the phone channel.
    There are a few apps in the store that will convert messages to SMS, for use with non apple folks.  Check out the app store.  Search SMS.

  • How to send a pdf file via http call

    Hi Experts,
    Please try to think on how you would send a file like a pdf file via the http call. You might need to convert the pdf in a character string which can be sent via http. The character string then might need to  get converted back into a pdf and saved in a file. Read through the Archive Link API guide to see how they send the body of a file.
    Please it is urgent......
    Thanks
    Basu

    so you want to push the PDF file over http to external system.
    where is pdf file stored.
    for examle if its in the clients desktop, you can use gui_upload to upload to internal tabble (type BIN) then use FM SCMS_BINARY_TO_XSTRING to conver the binary table to type string.
    then use cl_http_client class to push the file to the destination.

  • How to rectify a connection object if it was entered wrong in a premise

    Hi,
    Please guide me how can we rectify the cases where  connection object was entered wrongly in the premise.
    Thanks and Regards

    Hi,
    I request you to please suggest some functional transaction.
    Please guide.It is very urgent.
    Thanks and Regards
    Edited by: MPVash Vash on Oct 20, 2008 10:59 AM

  • Getting RuntimeException while sending a JMenu Object via http

    Hello,
    since Java 1.5.0 i use a mechanism, which transfers a JMenu from my servlet object to my applet object via http.
    Now since 1.5.0_02 i get this Exception while doing it:
    java.security.AccessControlException: access denied (java.lang.RuntimePermission accessClassInPackage.sun.swing)
    Now there is nothing to find about this. Not here in the forums, neither in google or anywhere else.
    My guess is, its a matter of deserialization of thoses Jmenus.
    Anybody out there with the same problem?
    Anybody knows how to solve this WITHOUT changes the policy?
    thanks
    steffan

    The directory that contains msgsend.class (usually the current directory)
    is not in your CLASSPATH setting. Be sure that "." is included as one of the
    entries in CLASSPATH.

  • OBIEE 11g: How to send email from Analysis (via Action Framework)

    Hi,
    I have installed OBIEE 11g SampleAppLite in my POC box.
    One of the features I want to have is to allow users to send their feedback (email) about a report to the report owner. Can this be done without launching Outlook? I tried to Invoke a Browser Script and found that I can display a form showing Recipient, Subject and Message text fields, but I do not know how to send the email.
    Thanks!

    Hi Devarasu,
    Thanks for your reply. The link you gave is for sending iBots. But if I do this, users will not be able to send their feedback / comment.

  • How i send files , pic etc via bluetooth , from my i pad mini to another i pad mini ??

    Im having problems working out how to send with bluetooth on my ipad mini .... i have dropbox etc , but still cant work out how to send books or pdfs or anything
    could anyone help please ?thanks

    You can use Photo Transfer App to transfer photos and movies
    http://i1224.photobucket.com/albums/ee374/Diavonex/Album%205/3af5c541040e15e3f6b 3356e4c55cbfc.jpg

  • How to send an instant alert via LMS 4.2.4 when a new machine is connected

    Hello,
    I have LMS version 4.2.4 installed and I discovered my network. 
    All is ok. Now I want that LMS send me notification by mail when a new (foreign) machine is conected to my network.
    Is it possible and How to do it via GUI ?

    I think that you are looking for the Dynamic User Tracking function.  I am looking at the Admin user guide trying to figure out how to do this.  I enabled trap forwarding from fault management and now I am trying to determine what I need to do on the switches.  Appendix E describes "Commands to Enable MAC Notification Traps onDevices".  The manual states "The list of commands that needs to be run on the devices are stored on the built-in XML file namely, MACCommands.XML in a hierarchical manner."  Ok... huh?  Where is this file located?  How is it used?  I didn't find it in the template center.  I also did a search within the CSCOpx directory and I came up empty.
    Has anyone been successful getting dynamic user tracking and mac notification working correctly?
    Thanks,
    -Jeff

  • How to Alert RFC connection failure via message mapping? Kindly Help!

    Hi Experts,
        I have a JMS - XI - RFC scenario.
    JMS receives the Rosattenet PIP contents and sends it to RFC function module in remote SAP R/3 system.
       I have a requirement where I have to monitor RFC connection failure because of the remote R/3 system being down. I have to send a email alert where the subject contains the PIP number to understand for which PIP the connection failed.
      The PIP number exists in the PIP content at the interface.
      If I use the Alert configuration in the runtime workbench for monitoring then I cannot dynamically pass the PIP number.
      Only way I think of triggering alert is in the message mapping via a Java UDF.
      But I am not sure how can I do this? How do I check in the UDF if RFC connection has failed? Is this the correct approach?
      How to acheive my requirement? Note that my email subject content is dynamic bacause if PIP number.
    Please help!
    Thanks
    Gopal
    Message was edited by:
            gopalkrishna baliga

    Hi Gopal,
    what version/sps of XI are u running?
    The easiest way to do what u want inside a UDF is to
    1. use JCo to try estabilish a connection to the remote SAP System
    2. if that fails, use JavaMail to send an email message
    Let your UDF work on the PIP number, accepting it as input, and (maybe) returning it as output if everything goes ok. Otherwise break the mapping execution as described by Michal in one of his last weblog (using Dynamic Configuration).
    Note that the above method doesn't guarantee that the message will be actually delivered, as some seconds could last between your check and the real RFC delivery operated by the Adapter Engine...
    I am evaluating a way to do the same with Alert Framework. I will let you know the result!
    Cheers,
    Alex

  • How to send a bufferedImage Object

    m trying to send bufferedImage from one computer to another via TCP/IP socket using following code...
    ObjectOutputStream writer = new ObjectOutputStream(socket.getOutputStream());
    writer.writeObject(<bufferedImage-Object>);
    writer.flush();
    but it gives an exception saying something it is not serializable.
    Can somebody suggest a way to send the object?
    Regards
    Deewa

    Hello there!
    Have a look at this:
    //The Server
    import java.awt.*;
    import javax.swing.*;
    import java.io.*;
    import java.awt.image.*;
    import java.awt.event.*;
    import java.net.*;
    * TheServer.java
    * Created on 29. Juli 2003, 11:19
    * @author  Darimont
    public class TheServer extends javax.swing.JFrame {
        private ServerSocket ss = null;
        private Socket s = null;
        private Thread serverThread = null;
        private BufferedImage bimg = null;
        private int[] pixarray = null;
        private PixelGrabber pg = null;
        /** Creates new form TheServer */
        public TheServer() {
            initComponents();
            loadImage();
        private void startServer(){
            if(serverThread == null){
                serverThread = new Thread(new myServer());
                serverThread.start();
        private void loadImage(){
            MediaTracker mt = new MediaTracker(this);
            try{
                bimg = javax.imageio.ImageIO.read(new File("c:/Beispiel1.jpg"));
            }catch(IOException ioe){
                ioe.printStackTrace();
            mt.addImage(bimg,0);
            try{
                mt.waitForAll();
            }catch(InterruptedException ie){
                ie.printStackTrace();
            mt = null;
            //Imagepixels to Array -->
            //My Imagesize is 100 x 100 Pixels so there are 10000 Pixels
            pixarray = new int[10000];
            pg = new PixelGrabber((Image)bimg,0,0,bimg.getWidth(),bimg.getHeight(),pixarray,0, 100);
            try{
                pg.grabPixels();
            }catch(InterruptedException ie){ie.printStackTrace();}
        /** This method is called from within the constructor to
         * initialize the form.
         * WARNING: Do NOT modify this code. The content of this method is
         * always regenerated by the Form Editor.
        private void initComponents() {
            java.awt.GridBagConstraints gridBagConstraints;
            jPanel1 = new javax.swing.JPanel();
            jPanel2 = new javax.swing.JPanel();
            jButton2 = new javax.swing.JButton();
            getContentPane().setLayout(new java.awt.GridBagLayout());
            addWindowListener(new java.awt.event.WindowAdapter() {
                public void windowClosing(java.awt.event.WindowEvent evt) {
                    exitForm(evt);
            jPanel1.setMinimumSize(new java.awt.Dimension(400, 300));
            jPanel1.setPreferredSize(new java.awt.Dimension(400, 300));
            getContentPane().add(jPanel1, new java.awt.GridBagConstraints());
            jPanel2.setMinimumSize(new java.awt.Dimension(400, 50));
            jPanel2.setPreferredSize(new java.awt.Dimension(400, 50));
            jButton2.setText("Start Server");
            jButton2.addMouseListener(new java.awt.event.MouseAdapter() {
                public void mousePressed(java.awt.event.MouseEvent evt) {
                    jButton2MousePressed(evt);
            jPanel2.add(jButton2);
            gridBagConstraints = new java.awt.GridBagConstraints();
            gridBagConstraints.gridx = 0;
            gridBagConstraints.gridy = 1;
            getContentPane().add(jPanel2, gridBagConstraints);
            pack();
        private void jButton2MousePressed(java.awt.event.MouseEvent evt) {
            // Add your handling code here:
            startServer();
        /** Exit the Application */
        private void exitForm(java.awt.event.WindowEvent evt) {
            System.exit(0);
        public void paint(Graphics g){
            super.paint(g);
            if(bimg !=null)
                jPanel1.getGraphics().drawImage(bimg.getScaledInstance(bimg.getWidth(),bimg.getHeight(),Image.SCALE_FAST),0,0,bimg.getWidth(),bimg.getHeight(),this);
         * @param args the command line arguments
        public static void main(String args[]) {
            new TheServer().show();
        class myServer implements Runnable{
            ObjectOutputStream oos = null;
            public void run() {
                try{
                    ss = new ServerSocket(8888);
                    System.out.println("Server started!");
                    while((s=ss.accept())==null)
                        Thread.currentThread().sleep(100);
                    System.out.println("Connected");
                    BufferedOutputStream bos = new BufferedOutputStream(s.getOutputStream());
                    oos = new ObjectOutputStream(bos);
                    oos.writeObject(pixarray);
                    oos.close();
                    s.close();
                    s= null;
                    ss.close();
                    ss = null;
                    System.out.println("Connection closed");
                }catch(IOException ioe){ ioe.printStackTrace();
                }catch(InterruptedException ie) { ie.printStackTrace();
                } //catch(SocketException se){ se.printStackTrace(); }
        // Variables declaration - do not modify
        private javax.swing.JButton jButton2;
        private javax.swing.JPanel jPanel1;
        private javax.swing.JPanel jPanel2;
        // End of variables declaration
    }// The Client
    import java.awt.*;
    import java.net.*;
    import java.io.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.awt.image.*;
    * TheClient.java
    * Created on 29. Juli 2003, 12:08
    * @author  Darimont
    public class TheClient extends javax.swing.JFrame {
        private Image img = null;
        private Socket s = null;
        private int[] imga = null;
        private Thread clientThread  = null;
        /** Creates new form TheClient */
        public TheClient() {
            initComponents();
        public void start(){
            if(clientThread ==null){
                clientThread = new Thread(new theClient());
                clientThread.start();
        /** This method is called from within the constructor to
         * initialize the form.
         * WARNING: Do NOT modify this code. The content of this method is
         * always regenerated by the Form Editor.
        private void initComponents() {
            java.awt.GridBagConstraints gridBagConstraints;
            jPanel1 = new javax.swing.JPanel();
            jPanel2 = new javax.swing.JPanel();
            jButton1 = new javax.swing.JButton();
            getContentPane().setLayout(new java.awt.GridBagLayout());
            addWindowListener(new java.awt.event.WindowAdapter() {
                public void windowClosing(java.awt.event.WindowEvent evt) {
                    exitForm(evt);
            jPanel1.setMinimumSize(new java.awt.Dimension(400, 250));
            jPanel1.setPreferredSize(new java.awt.Dimension(400, 250));
            gridBagConstraints = new java.awt.GridBagConstraints();
            gridBagConstraints.gridx = 0;
            gridBagConstraints.gridy = 0;
            getContentPane().add(jPanel1, gridBagConstraints);
            jPanel2.setMinimumSize(new java.awt.Dimension(400, 50));
            jPanel2.setPreferredSize(new java.awt.Dimension(400, 50));
            jButton1.setText("Get Image");
            jButton1.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jButton1ActionPerformed(evt);
            jButton1.addMouseListener(new java.awt.event.MouseAdapter() {
                public void mousePressed(java.awt.event.MouseEvent evt) {
                    jButton1MousePressed(evt);
            jPanel2.add(jButton1);
            gridBagConstraints = new java.awt.GridBagConstraints();
            gridBagConstraints.gridx = 0;
            gridBagConstraints.gridy = 1;
            getContentPane().add(jPanel2, gridBagConstraints);
            pack();
        private void jButton1MousePressed(java.awt.event.MouseEvent evt) {
            // Add your handling code here:
            start();
        private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
            // Add your handling code here:
        public void paint(Graphics g){
            super.paint(g);
            if(img!=null)
                jPanel1.getGraphics().drawImage(img,0,0,img.getWidth(null),img.getHeight(null),this);
        /** Exit the Application */
        private void exitForm(java.awt.event.WindowEvent evt) {
            System.exit(0);
         * @param args the command line arguments
        public static void main(String args[]) {
            new TheClient().show();
        private void resampleImage(int[] imageArray){
            img = createImage(new MemoryImageSource(100,100,imageArray,0,100));
        class theClient implements Runnable{
            ObjectInputStream ois = null;
            BufferedInputStream bis = null;
            public void run() {
                try{
                    s = new Socket("localhost",8888);
                    if(s != null){
                        bis = new BufferedInputStream(s.getInputStream());
                        ois = new ObjectInputStream(bis);
                        imga = (int[])ois.readObject();
                        if (imga != null){
                            resampleImage(imga);
                            jPanel1.getGraphics().drawImage(img,0,0,img.getWidth(null),img.getHeight(null),jPanel1);
                }catch(IOException ioe){ ioe.printStackTrace();
                }catch(ClassNotFoundException cnfe){ cnfe.printStackTrace();
        // Variables declaration - do not modify
        private javax.swing.JButton jButton1;
        private javax.swing.JPanel jPanel1;
        private javax.swing.JPanel jPanel2;
        // End of variables declaration
    }Have a nice day!
    bye Tom

  • How to send command to device via HTTP

    Hy everyone,
    i have installed olite on a number of wince device.
    If i try to send command to the device when connected with the desktop computer on wich the mobile server is installed everything goes well.
    My devices are connected by wifi to the lan of my company and i would like to send command via HTTP.
    I tried to change the settings on the mobile server setting the Network Protocol to HTTP and setting the ip of the device but it does not work.
    Does anyone know how to solve the problem?
    David.

    Hi Ravi,
    yes the command is queued but anything happens.
    I tried to wait for long time but the command never succeed to execute.
    If i try to send again the command from the Command History windows the command fails.
    David.

  • How to send messages in Chinese via FIOS e-mail

    My wife was previously able to write messages in Chinese on her I-Pad and send them via Comcast e-mail.  When she tries to do the same on our new FIOS account, the Chinese characters are lost and replaced with question marks.  Incoming Chinese messages are completely scrambled with nonsense characters.  How do we rectify this issue?

    Thanks for your comment.
    en....I want to do something..I will maintenance a users list
    in charroom.
    I write a function in main.asc file , client can get users
    list via call the function.
    I write some codes in application.onConnect
    when a user connect, it will add users list.
    In application.onDisconnect, when a user disconnect, it will
    remove from users list.
    My hope when a user disconnect, I send a message to
    shareobject. the shareobject is called in other clients.
    Other client can retrieve the remove user message, they will
    call the function to get new users list.
    It is my idea. Can you give me some codes for my idea?
    Thank you very much.

  • How to send an XML file via HTTP_POST

    I have an ABAP program that creates an XML file and I need to somehow post this XML file to a webserver and read the HTTP Response that it sends back.  I see that there is a function module called HTTP_POST but I've never used it before.  I also see that there are a number of ABAP Objects related to HTTP.  Has anyone done this before. 
    I'm on SAP 4.7 (6.20)
    Thank you,

    I went to www.fedex.com and exported their SSL cert.  I then imported it into SAP via STRUST.  However, I still get the same http_communication_error.  The XML needs to be posted to this address:  'https://gatewaybeta.fedex.com:443/GatewayDC'
    Here is my code:
    Note: wf_string contains the XML
    CALL METHOD cl_http_client=>create
      EXPORTING
        host          = 'https://gatewaybeta.fedex.com'
        service       = '443'
        scheme        = '2'
       proxy_host    =  wf_proxy
       proxy_service =  wf_port
      IMPORTING
        client        = http_client.
    http_client->propertytype_logon_popup = http_client->co_disabled.
    wf_user = '' .
    wf_password = '' .
    proxy server authentication
    CALL METHOD http_client->authenticate
      EXPORTING
        proxy_authentication = 'X'
        username             = wf_user
        password             = wf_password.
    CALL METHOD http_client->request->set_header_field
      EXPORTING
        name  = '~request_method'
        value = 'POST'.
    CALL METHOD http_client->request->set_header_field
      EXPORTING
        name  = '~server_protocol'
        value = 'HTTP/1.1'.
    CALL METHOD http_client->request->set_header_field
      EXPORTING
        name  = '~request_uri'
        value = 'https://gatewaybeta.fedex.com:443/GatewayDC'.
    CALL METHOD http_client->request->set_header_field
      EXPORTING
        name  = 'Content-Type'
        value = 'text/xml; charset=utf-8'.
    CALL METHOD http_client->request->set_header_field
      EXPORTING
        name  = 'Content-Length'
        value = txlen.
    *CALL METHOD http_client->request->set_header_field
    EXPORTING
       name  = 'SOAPAction'
       value = 'https://gatewaybeta.fedex.com:443/GatewayDC'
    CALL METHOD http_client->request->set_cdata
      EXPORTING
        data   = wf_string
        offset = 0
        length = rlength.
    CALL METHOD http_client->send
      EXCEPTIONS
        http_communication_failure = 1
        http_invalid_state         = 2.
    CALL METHOD http_client->receive
      EXCEPTIONS
        http_communication_failure = 1
        http_invalid_state         = 2
        http_processing_failed     = 3.
    CLEAR wf_string1 .
    wf_string1 = http_client->response->get_cdata( ).

  • How do you group connected objects?

    Is there a way you can group objects (in my case text boxes) that have been connected?  When I try to the "Group" button is greyed out, and if I group them first, I'm unable to connect them (greyed out).

    You can't group them, but you can pass them through Preview and get them to one item. To do this, select them all and copy, them open Preview and command-n (or File>New from Clipboard), copy this and paste back into Keynote. Before you do this, make sure your text is how you want it as you can't change it after you do this.

Maybe you are looking for

  • =( My iBook is still dead!!! (with included symptoms of a dying iBook)

    I bought my iBook last May2004. I loved my iBook and took really good care of it. After one year of usage, all of a sudden my iBook stopped working -- a month after my warranty had expired... It all started with the "sleeping problem" -- when it didn

  • Not able to connect for BI publisher from OBIEE

    Hi Experts, I am trying to loggin through BI publisher( more products- BI publisher) and i am getting an error of Reporting Login(404) not found. I started the OC4J server aslo. I dont have explicity a BI publisher server. is there any simple steps t

  • HP 2550Ln Color LaserJet issues

    Back at work I recently "inherited" an HP 2550Ln Color LaserJet printer from the previous inhabitant of the cubicle. No docs, no install media. Toner cartridges mostly full, worst case is black @ 35%, which should last me for some 1,000 prints or so.

  • How to show a negative value in diffenet color in af:inputText inlineStyle

    Hi Friends, i am facing a problem with <af:inputText /> in Jheadstart. i want to show a value in red color, if that value get's into the negative value in <af:inputText />. I was tyring with following code using inlineStyle attribute in af:inputText

  • Page 5 missing features

    There are a few things that annoy me, e.g. DTP previous features. Does Apple not think we need a DTP program, only a word processor??? 1 Missing vertical rulers and drag-in guides, the Arrange features are not enough to do proper layouts 2 Linking of