Security between two jvm using JNDI

Hi ,
   I want to access the UME service of the SAP J2EE Container using a stanalone client application.
So the client would be running on remote JVM.
Here we use the JNDI service to communicate between the client and server.
p.put(Context.INITIAL_CONTEXT_FACTORY,"com.sap.engine.services.jndi.InitialContextFactoryImpl");
                    p.put(Context.PROVIDER_URL, providerURL.trim());
                    p.put(Context.SECURITY_PRINCIPAL, securityPrinciple.trim());
                    p.put(Context.SECURITY_CREDENTIALS, securityCredentials.trim());
                    Context ctx = (Context) new InitialContext(p);
                    Object objRef = ctx.lookup(ejbName.trim());
I want to know that is the communication between the client and server secured in this scenario
Best Regards
Manoj

Hi,
Java Remote Method Invocation by default does not support authenticated and encrypted transport.
That is, objects sent over the network are not encrypted.
A firewall can be used to secure a Java RMI application. Here, the firewall must allow access to specifically known ports. That is, these ports cannot be denied access by the firewall. SOCKS provides a partial solution to the use of RMI through firewalls in that it protects outgoing RMI calls, but incoming RMI calls as well as RMI call-backs are not protected.
This may be overcome by using bi-directional RMI implementation through the firewalls. However, it requires the use of specific settings that can relax the security or application level proxy servers, thus increasing the administrative overheads. Also, changing the security policy to allow bi directional RMI traffic should only be done with extreme care. A better solution towards securing RMI is by means of supporting authenticated and encrypted transport, so that a network attacker cannot alter data on communication. This can be achieved by running RMI on SSL.
regards
Vivek Nidhi

Similar Messages

  • How to create relationship between two records using MDM Java APIs

    Hi,
    I am trying to create relationship between two records using Java Apis. Please guide me in doing this.
    Regards,
    Niraj

    Hi Niraj,
    There is ModifyRelationshipsCommand:
    http://help.sap.com/javadocs/MDM/SP06/com/sap/mdm/data/commands/ModifyRelationshipsCommand.html
    Retrieve Relationship command:
    http://help.sap.com/javadocs/MDM/current/com/sap/mdm/schema/commands/GetRelationshipListCommand.html
    Also, please refer similar thread, MDM Java API and relationships.
    Hope it helps..
    Regards,
    Mandeep Saini

  • How to draw a line(shortest distance)  between two ellipse using SWING

    how to draw a line(should be shortest distance) between two ellipse using SWING
    any help will be appreciated
    regards

    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import javax.swing.*;
    import javax.swing.event.MouseInputAdapter;
    public class ELine extends JPanel {
        Ellipse2D.Double red = new Ellipse2D.Double(150,110,75,165);
        Ellipse2D.Double blue = new Ellipse2D.Double(150,50,100,50);
        Line2D.Double line = new Line2D.Double();
        protected void paintComponent(Graphics g) {
            super.paintComponent(g);
            Graphics2D g2 = (Graphics2D)g;
            g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                                RenderingHints.VALUE_ANTIALIAS_ON);
            g2.setPaint(Color.green.darker());
            g2.draw(line);
            g2.setPaint(Color.blue);
            g2.draw(blue);
            g2.setPaint(Color.red);
            g2.draw(red);
        private void connect() {
            double flatness = 0.01;
            PathIterator pit = blue.getPathIterator(null, flatness);
            double[] coords = new double[2];
            double x1 = 0, y1 = 0, x2 = 0, y2 = 0;
            double min = Double.MAX_VALUE;
            while(!pit.isDone()) {
                int type = pit.currentSegment(coords);
                switch(type) {
                    case PathIterator.SEG_MOVETO:
                    case PathIterator.SEG_LINETO:
                        Point2D.Double p = getClosestPoint(coords[0], coords[1]);
                        double dist = p.distance(coords[0], coords[1]);
                        if(dist < min) {
                            min = dist;
                            x1 = coords[0];
                            y1 = coords[1];
                            x2 = p.x;
                            y2 = p.y;
                        break;
                    case PathIterator.SEG_CLOSE:
                        break;
                    default:
                        System.out.println("blue type: " + type);
                pit.next();
            line.setLine(x1, y1, x2, y2);
        private Point2D.Double getClosestPoint(double x, double y) {
            double flatness = 0.01;
            PathIterator pit = red.getPathIterator(null, flatness);
            double[] coords = new double[2];
            Point2D.Double p = new Point2D.Double();
            double min = Double.MAX_VALUE;
            while(!pit.isDone()) {
                int type = pit.currentSegment(coords);
                switch(type) {
                    case PathIterator.SEG_MOVETO:
                    case PathIterator.SEG_LINETO:
                        double dist = Point2D.distance(x, y, coords[0], coords[1]);
                        if(dist < min) {
                            min = dist;
                            p.setLocation(coords[0], coords[1]);
                        break;
                    case PathIterator.SEG_CLOSE:
                        break;
                    default:
                        System.out.println("red type: " + type);
                pit.next();
            return p;
        public static void main(String[] args) {
            final ELine test = new ELine();
            test.addMouseListener(test.mia);
            test.addMouseMotionListener(test.mia);
            JFrame f = new JFrame();
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.add(test);
            f.setSize(400,400);
            f.setLocation(200,200);
            f.setVisible(true);
            EventQueue.invokeLater(new Runnable() {
                public void run() {
                    Graphics g = test.getGraphics();
                    g.drawString("drag me", 175, 80);
                    g.dispose();
        private MouseInputAdapter mia = new MouseInputAdapter() {
            Point2D.Double offset = new Point2D.Double();
            boolean dragging = false;
            public void mousePressed(MouseEvent e) {
                Point p = e.getPoint();
                if(blue.contains(p)) {
                    offset.x = p.x - blue.x;
                    offset.y = p.y - blue.y;
                    dragging = true;
            public void mouseReleased(MouseEvent e) {
                dragging = false;
            public void mouseDragged(MouseEvent e) {
                if(dragging) {
                    double x = e.getX() - offset.x;
                    double y = e.getY() - offset.y;
                    blue.setFrame(x, y, blue.width, blue.height);
                    connect();
                    repaint();
    }

  • How can I remove all content between two tags using Find/Replace regular expressions?

    This one is driving me bonkers...  I'm relatively new to regular expressions, but I'm trying to get Dreamweaver to remove all content between two tags in an XML document.  For example, let's say I have the following XML:
    <custom>
    <![CDATA[<p>Some text</p>
    <p>Some more text</p>]]>
    </custom>
    I'd like to do a Find/Replace that produces:
    <custom>
    </custom>
    In essence, I'd like to strip all of the content between two tags.  Ideally, I'd like to know how to strip the CDATA content as well, to return the following:
    <custom>
    <![CDATA[]]>
    </custom>
    I'd much appreciate any suggestions on accomplishing this.
    Many thanks!

    Thanks much for your response.  I found David's article to be a little thin with respect to examples using quantifiers in coordination with the wildcard metacharacters; however, I was able to cobble together a working expression through trial and error using the information he presented.  For posterity, here’s the solution:
    Find:
    <custom>[\d\D]*?</custom>
    Replace:
    <custom>
    <![CDATA[]]>
    </custom>
    I believe this literally translates to:
    [] = find anything in this range/character class
    \d = find any digit character (i.e. any number)
    \D = find any non-digit character (i.e. anything except numbers)
    *? = match zero or more times, but as few times as possible (i.e. match multiple characters per instance, but only match one instance at a time, or none at all)
    I’m still not sure how to effectively utilize the . wildcard.  For example, the following expression will not find content that ends with a number:
    <custom>.*?[\D]*?</ custom >
    I'm presuming this is because numbers aren't included in the \D metacharacter; however, shouldn't numbers be picked up by the .*? expression?

  • How to find the phase difference between two signals using Hilbert transform

    hi, 
        I am new to LabView.... I am trying to find phase difference between two signals. I sucessfuly found out the phase difference between two predefined waves using single tone measurement. .... But I really want to know how can I measure phase difference between two signals( not predefined... ie we don't know the initial conditions) using hilbert transform or any transformation techniques (without using zero cross detection).. I tried by using hilbert transform based on algorithm... bt I am getting error.... plz help me
    Attachments:
    phase_differece.vi ‏66 KB

    you could try something similar to this, for each table pair that you want to compare:
    SELECT 'TABLE_A has these columns that are not in TABLE_B', DIFF.*
      FROM (
            SELECT  COLUMN_NAME, DATA_TYPE, DATA_LENGTH
              FROM all_tab_columns
             WHERE table_name = 'TABLE_A'
             MINUS
            SELECT COLUMN_NAME, DATA_TYPE, DATA_LENGTH
              FROM all_tab_columns
             WHERE table_name = 'TABLE_B'
          ) DIFF
    UNION
    SELECT 'TABLE_B has these columns that are not in TABLE_A', DIFF.*
      FROM (
            SELECT COLUMN_NAME, DATA_TYPE, DATA_LENGTH
              FROM all_tab_columns
             WHERE table_name = 'TABLE_B'
             MINUS
            SELECT COLUMN_NAME, DATA_TYPE, DATA_LENGTH
              FROM all_tab_columns
             WHERE table_name = 'TABLE_A'
          ) DIFF;that's assuming, column_name, data_type and data_length are all you want to compare on.

  • Toplink cache synchronization between two nodes using tomcat

    Hi,
    In our appcation we have two nodes. Using websphere we used to synchronize toplink cache between two nodes. Can we do same thing using tomcat.

    Yes, TopLink implements cache synchronization using JMS or RMI easily, which are not dependent on the server being used - though it JMS especially does require a JMS provider that is accessible from each node.  Cache synchronization is now cache coordination, and is described using JPA properties here:
    http://wiki.eclipse.org/EclipseLink/Examples/JPA/CacheCoordination
    the Toplink cache synchronization/coordination with JMS | EMBARCADEROS seems to be a good read for cache coordination over JMS, but is more aimed at TopLink's sessions.xml configuration.
    Best Regards,
    Chris

  • Can i play a game between two ipads using bluetooth

    Can I play games betwwen two ipads using bluetooth

    It depends on the game. The app has to be specifically written to allow play between two devices via Bluetooth.
    Regards.

  • Subject: How to do join between two tables using something like SE16

    SE16, SE11 provide form based interface query information from a single table. Is there a way to do join between two tables without creating an infoset erc? I am looking for something similar to sql join but in SAP BI 7.0
    Thanks.

    Hi
    Pls look into below links. Hope this helps you.
    1. http://help.sap.com/saphelp_46c/helpdata/EN/d2/cb45bf455611d189710000e8322d00/content.htm
    2. http://help.sap.com/saphelp_46c/helpdata/EN/d2/cb45a5455611d189710000e8322d00/content.htm
    Regards
    Sirigiri

  • Communication between two jvm (client and server)

    Hi ,
       I want to access the UME service of the SAP J2EE Container using a stanalone client application.
    So the client would be running on remote JVM.
    Here we use the JNDI service to communicate between the client and server.
    p.put(Context.INITIAL_CONTEXT_FACTORY,"com.sap.engine.services.jndi.InitialContextFactoryImpl");
                        p.put(Context.PROVIDER_URL, providerURL.trim());
                        p.put(Context.SECURITY_PRINCIPAL, securityPrinciple.trim());
                        p.put(Context.SECURITY_CREDENTIALS, securityCredentials.trim());
                        Context ctx = (Context) new InitialContext(p);
                        Object objRef = ctx.lookup(ejbName.trim());
    I want to know that is the communication between the client and server secured in this scenario
    Best Regards
    Manoj

    Okay, the client and server VMs are different implementations of the Hotspot engine. Hotspot basically takes the Java bytecode from your .class files and turns it into native machine instructions at runtime. (The optimizations are actually much more complex than that, but that's the basic concept.)
    The client VM is so named because it's designed to be used for GUI-type applications interacting with the user. It is designed to have a quicker startup and smaller memory footprint.
    The server VM uses more memory and is typically slower at starting up than the client VM, but can often perform ridiculously fast. This of course depends completely on the particular code being run, and you should probably profile and see which VM works better for your application.
    Some interesting optimizations are performed by the 1.4.1 server VM, such as: removal of array-bounds checks (when it determines that the index can't become out of bounds), inlining of methods, and more.
    Here is a link to more info if you're interested:
    http://java.sun.com/products/hotspot/docs/whitepaper/Java_HotSpot_WP_Final_4_30_01.html

  • How do I share files between two Macs using ethernet?

    I have two Macs, both running OS X 10.4.11. How can I connect them using ethernet in order to transfer files back and forth?
    Pete

    I have an ethernet hub with both computers connected to it. You may be able to just connect the two computers with a cable, but it might have to be a "Crossover cable"
    Go to your system preferences>>Sharing and turn of file sharing for each or both computers.
    Then go to the Finder>>Go>>Network and the other computer should show up there. Click to connect.
    You will have a choice to connect under a password or as a guest. If you want security, set up passwords, otherwise just use guest.

  • SSAS cube sync between two servers using analysis service execute DDL task in SSIS

    hi folks:
      I have two AS servers: TOBIDW and TOBIDW2. TOBIDW2 is the production server where users use Excel to connect . TOBIDW has been identified as a backup Cube server in case if TOBIDW2 is not available.   My job is to create a SSIS package that syncs
    cube db from TOBIDW2 to TOBIDW everyday (one way).
       The standard SSIS dev process  for us   is to develop  in the dev environment and deploy  to production env.  The XMLA script has been extracted using Sync wizard of SSMS on production cube server.  Inside this
    XMLA, the connectionstring is using integrated security = SSPI. 
    When deploy to production, what username/password I should use to replace the integrated security? 
    Thanks
    <Synchronize xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.microsoft.com/analysisservices/2003/engine">
    <Source>
    <ConnectionString>Provider=MSOLAP.5;Data Source=TOBIDW2;Integrated Security=SSPI;Initial Catalog=ORDERDW</ConnectionString>
    <Object>
    <DatabaseID>ORDERDW</DatabaseID>
    </Object>
    </Source>
    <SynchronizeSecurity>CopyAll</SynchronizeSecurity>
    <ApplyCompression>true</ApplyCompression>
    </Synchronize>
    --Currently using Reporting Service 2000; Visual Studio .NET 2003; Visual Source Safe SSIS 2008 SSAS 2008, SVN --

    Hi cat_ca, 
    You don't need to replace Integrated Security=SSPI with other Windows username and password. Integrated Security means it uses the Windows user that launches the process (the dtexec.exe that runs your SSIS package) to connect to the server TOBIDW2 you defined
    in your connection string. 
    Actually for SSAS connection string, you don't normally need to specify user name and password because SSAS only takes Windows Authentication and Integrated Security takes care of it for us automatically using SSPI. The only case when you need to manually
    enter user name and password (Windows user) is when you configured a HTTP Pump to sit in front of your SSAS server and use HTTP://servername/ to access your SSAS server. This is because IIS server could be configured to take Basic Authentication which requires
    explicitly supply Windows user name and password for authentication. In that case your connection string should look similar to this:
    Provider=MSOLAP;Data Source=http://serverName/;Initial Catalog=myDataBase;
    User Id=domain\user;Password=myPassword;

  • Enable port security between Two switches

    Hi Everyone,
    I connected two switches together  via below config
    Switch A
    int gi0/1
    switch mode access
    switchport access vlan 10
    Switch B
    int gi0/1
    switch mode access
    switchport access vlan 10
    They work fine with above config.
    I did the Test below
    However when i changed Config of Switch B  as below
    int gi0/1
    switch mode access
    switchport access vlan 10
    switchport port-security  
    Switch B is unable to ping its default gateway.
    Also Switch B is not reachable via SSH.
    Port is up up and in STP forwarding state.
    Switch B can see Switch A as a neighbour.
    Also Switch B is not reachable via SSH.
    I know that switchport port-security we use only when connecting to PC.
    S does this mean that  on above scenario layer 1 and layer 2 are up but layers beyond 3 and above are not reachable like ping,ssh etc??
    Regards
    MAhesh

    I was just trying to see how the switches behave with this config.Nothing much just  exploring the options in the network world
    Ideally if you want to connect two switches together in Layer 2, Dot1Q trunking is the way to go.  You do not want to put port security because it is useless. 

  • Authorization denied between two computers using FireWire

    I used to synk my MacBookPro with my PowerPC G4 using a local Firewire network. That was running smoothly when I was running under Mac OSX 10.4.9.
    I recently upgraded both machines to OSX 10.5.6, but when I want to copy files from the computer I'm using to the mounted computer, I have an error message saying:
    "The item "name of the file to be copied" contains one or more items you do not have permission to read. Do you want to copy the items you are allowed to read?"
    If I type continue, I have the following error message:
    "The operation cannot be completed because you do not have sufficient privileges for some of the items"
    What is strange is that an icon of the file is copied on the mounted computer, but the file is corrupted and its size is close to 0 bytes.
    I'm logged in as administrator on both machines, so I do not understand why this is happening.
    Any help or hints about this issue will be greatly appreciated
    Cassou

    Those FireWire links are for a third-party vendor (OWC), not Apple.  I'm sure there are UK vendors that sell the same type of FireWire items.  For example, when I search "firewire 800 400" on eBay UK (www.ebay.co.uk), I see many listings.  For the adapter, add "adapter" to the search.
    An Ethernet (networking) cable is pretty standard.  To get the highest speed possible between an iMac G4 and a recent Intel Mac, it should be "Cat-5" or better (it is usually printed on the cable).  If it's a really old cable (more than ten years), you may want to get a new one that is Cat-5e or better.
    Do your old Mac AND your new Mac currently connect to the same "hub" or router for Internet access?  The connection can be wired or wireless.  If so, they can (probably) already be connected using File Sharing to transfer files. 
    On the iMac G4 running Tiger (10.4), open System Preferences Sharing pane.  Check the box for Personal File Sharing and click the Start button over to the right.  Note the Computer Name that is shown in that window.
    On the new Mac, open a Finder window.  In the sidebar, look under SHARED.  If the iMac G4 (with Computer Name noted above) is listed there, you can do File Sharing.  Select it in the sidebar.  Over to the right, click on Connect As.  In the window that comes up, enter the user name and password for your user account on the iMac G4, and click Connect.  You should see some "sharepoints."  At this point, you can go into anyone of those locations (on the iMac G4) like it was your local hard drive, and copy files to your new Mac.
    If that does not work with your current connection, you can try the same thing after connecting the two Macs directly with an Ethernet cable.

  • How do i share files between two computers using the ethernet?

    i have bought a cord that is ethernet to ethernet. i do not understand how or where to go after the two computers are seemingly connected. i have a bunch of photos on iphoto id like to transfer. thank you.

    Out of curiosity do you already have a home network? If so do both computers connect to the network? In this case just use File Sharing which is enabled in the Sharing preferences.
    File Sharing on Macs
    Mac 101- File sharing
    Tutorial- File sharing in OS X - MacFixIt

  • Comparasions of records between two dsos  using abap program

    Hello Experts,
                           As per my business requirements we Implemented  30 DSO (EDW Layer) for x Reason  with the reference from  Y Reason DSOs. and for x reson dso we created  transformations and dtp. through process chains we loaded the data to X Reason Dsos. after loading i want to comare these two dso records through  ABAP Progrm.
    here my source is : X Region Dsos
    here Trget is        :  Y Region Dsos
    these two are the mandatory fields
    and the optional fields are:
    1. Sales org
    2. Sales division
    3. document creation date.
      for this type of requirement i want to implement  ABAP Program.i want to abap code for this type of requirement. anyone  have abap code for similar type of requirement please send the abap code.
    Thanks & Regards,

    Hi saurabh,
    If your requirement if to comepare both the values based on the sales org, sales div, data, u can build a report or if you want to look up the both the DSO and want to perform any operation we need to write routine at transforamation level.
    I'm sending u a sample code where i had used for look up two ods and delete the exisitng saled docs.in the BI.
    DATA : BEGIN OF i_uxxx OCCURS 0,
           /bic/zaw        LIKE    /bic/aZD_UDLIT00-/bic/zaw,
           END OF i_uxxx.
    DATA : wa_udlit LIKE i_uxxxt.
    DATA : BEGIN OF i_uxxxx OCCURS 0,
           /bic/zaw        LIKE    /bic/aZD_UDAN00-/bic/zaw,
           END OF i_udxxx.
    DATA : wa_uxxxx LIKE i_uxxx.
    case 1 : For uxxxx lite data
    CLEAR i_uxxx.
        DATA: wa_srcpack  TYPE  tys_sc_1,
              zindex      TYPE  sy-tabix.
        BREAK-POINT.
    CLEAR: zindex.
        SELECT /bic/zaw
        FROM  /bic/aZD_UDLIT00
        INTO  TABLE i_uxxx.
        FOR ALL ENTRIES IN SOURCE_PACKAGE
        WHERE /bic/zaw  = SOURCE_PACKAGE-/bic/zcustomer.
        LOOP AT SOURCE_PACKAGE INTO wa_srcpack.
          zindex = sy-tabix.
          CLEAR wa_xxx.
          READ TABLE i_uxxx INTO wa_uxxx
                               WITH KEY /bic/zaw = wa_srcpack-/bic/zcustomer
          IF sy-subrc = 0.
            Delete SOURCE_PACKAGE.
          ENDIF.
       MODIFY SOURCE_PACKAGE INDEX zindex FROM wa_srcpack.
        CLEAR: zindex.
        ENDLOOP.
    *case 2 : For uxxxx data
    CLEAR i_uxxxx.
        DATA: wa_srcpack1  TYPE  tys_sc_1,
              zindex1      TYPE  sy-tabix.
        BREAK-POINT.
    CLEAR: zindex1.
        SELECT /bic/zaw
        FROM  /bic/aZD_UDAN00
        INTO  TABLE i_uxxxx
        FOR ALL ENTRIES IN SOURCE_PACKAGE
        WHERE /bic/zaw  = SOURCE_PACKAGE-/bic/zcustomer.
        LOOP AT SOURCE_PACKAGE INTO wa_srcpack1.
          zindex1 = sy-tabix.
          CLEAR wa_uxxx.
          READ TABLE i_uxxxx INTO wa_uxxx
                               WITH KEY /bic/zaw =
                               wa_srcpack1-/bic/zcustomer
          IF sy-subrc = 0.
            Delete SOURCE_PACKAGE.
          ENDIF.
       MODIFY SOURCE_PACKAGE INDEX zindex FROM wa_srcpack.
        CLEAR: zindex1.
    endloop.
    Hope this helps...
    Regards
    KP

Maybe you are looking for