How To: Applet Communication to a WL Cluster

          Hello,
          I currently have a Java 1.2 applet that has been converted to
          use a WL cluster (it needed fail over and load balancing.)
          The applet communicates with servlets (which in turn communicate
          with stateless EJBs) via an HTTP request. The WL cluster has
          been set-up and works fine. The problem is that I receive a
          SocketPermissions error when trying to connect to the WL cluster.
          I haven't found anything thats says an applet can't be used with
          a cluster, so I'm assuming there is a provision to get around
          the applet security model, but I'm unable to find anything that
          really tells me how. I found one posting that made reference to
          the 'WLS RJVM scheme', but I can't find any material on this
          either.
          Environment Info:
          - Java applet 1.2
          - IE 5.5 (using plug-in)
          - Apache WebServer
          - WL 5.1
          - Applet will be running on a INTRANET
          * Modifying the Java policy file is not an option for us.
          Any help would be greatly appreciated.
          thx
          D.Curtis
          

The applet, unless it is signed etc., can only communicate with the server
          from which it was downloaded. You should have a single address visible for
          the entire cluster, through WL proxying or via BigIp/Alteon/etc.
          Peace,
          Cameron Purdy
          Tangosol Inc.
          << Tangosol Server: How Weblogic applications are customized >>
          << Download now from http://www.tangosol.com/registration.jsp >>
          "D.Curtis" <[email protected]> wrote in message
          news:[email protected]...
          >
          > Hello,
          >
          > I currently have a Java 1.2 applet that has been converted to
          > use a WL cluster (it needed fail over and load balancing.)
          > The applet communicates with servlets (which in turn communicate
          > with stateless EJBs) via an HTTP request. The WL cluster has
          > been set-up and works fine. The problem is that I receive a
          > SocketPermissions error when trying to connect to the WL cluster.
          > I haven't found anything thats says an applet can't be used with
          > a cluster, so I'm assuming there is a provision to get around
          > the applet security model, but I'm unable to find anything that
          > really tells me how. I found one posting that made reference to
          > the 'WLS RJVM scheme', but I can't find any material on this
          > either.
          >
          > Environment Info:
          > - Java applet 1.2
          > - IE 5.5 (using plug-in)
          > - Apache WebServer
          > - WL 5.1
          > - Applet will be running on a INTRANET
          >
          > * Modifying the Java policy file is not an option for us.
          >
          > Any help would be greatly appreciated.
          >
          > thx
          > D.Curtis
          

Similar Messages

  • Asp-applet communication(URGENT!!)

    hi,
    i am facing a problem on asp-applet communication. i would like to ask how to pass applet parameters to asp page?my code below doesnt seem to work..
    smsClient.java
    public class smsClient {
    private JOptionPane jOptionPanel = new JOptionPane();
    private dialog dd;
    String str;
    public void executeSend(String smsno, String smsMessage,String user_id){
    String qrysmsno=smsno;
    String qrysmsMessage=smsMessage;
    String qryUserId=user_id;
    try{
    String qry=URLEncoder.encode("smsno")+ "=" + URLEncoder.encode(qrysmsno) + "&";
    qry= qry + URLEncoder.encode("smsMessage")+ "=" + URLEncoder.encode(qrysmsMessage);
    //qry= qry + URLEncoder.encode("user_id")+ "=" + URLEncoder.encode(qryUserId);
    URL url=new URL("http://172.20.34.116:8081/3dcommunity/sendsms.asp?"+qry);
    dialog dd=new dialog();
    //dd.showDialog(qry, "Alert!", JOptionPane.WARNING_MESSAGE);
              URLConnection uc = url.openConnection();
              uc.setDoOutput(true);
              uc.setRequestProperty("Content-Type","application/x-www-form-urlencoded");
              PrintWriter pw = new PrintWriter(uc.getOutputStream());
              pw.println(str);
              pw.close();
              BufferedReader in = new BufferedReader(new InputStreamReader(uc.getInputStream()));
              String res = in.readLine();
              dd.showDialog(res, "Alert!", JOptionPane.WARNING_MESSAGE);
              in.close();
    /*HttpURLConnection http = (HttpURLConnection)url.openConnection();
         http.setRequestMethod("GET");
         InputStream iStrm = null;
         if (http.getResponseCode() == HttpURLConnection.HTTP_OK) {
         iStrm = http.getInputStream();
         int length = (int) http.getContentLength();
         if (length > 0) {
         byte servletData[] = new byte[length];
         iStrm.read(servletData);
         String resultString = new String(servletData);
    dd.showDialog(res, "Alert!", JOptionPane.WARNING_MESSAGE);
         iStrm.close();*/
         catch(MalformedURLException e){
         System.err.println(e);
    dd.showDialog("MalformedURLException", "Alert!", JOptionPane.ERROR_MESSAGE);
         catch(IOException e){
         System.err.println(e);
    dd.showDialog("IOException", "Alert!", JOptionPane.ERROR_MESSAGE);
    sendsms.asp
    <%
         set mySMS = Server.CreateObject("SCSMS.SMS")
         mySMS.Port = "COM3"
    %>
    <%
              mfg = mySMS.Manufacturer
              mdl = mySMS.Model
              if mySMS.Error then
                   response.write mySMS.ErrorMsg
              else
                   response.write "Manufacturer : " & mfg & "<br>"
                   response.write "Model : " & mdl & "<br><br>"
              end if
              smsno=request.queryString("smsno")
              smsMessage=request.queryString("smsMessage")
         mySMS.sendsms smsno, smsMessage
         if mySMS.Error <> 0 then
              'response.write "Failed" & mySMS.ErrorMsg
         else
              response.write "Success"
         end if
    %>

    use the following class for applet to any web site connection (it can be asp, jsp, cgi etc)
    package com.oreilly.servlet;
    import java.io.*;
    import java.net.*;
    import java.util.*;
    * A class to simplify HTTP applet-server communication. It abstracts
    * the communication into messages, which can be either GET or POST.
    * <p>
    * It can be used like this:
    * <blockquote><pre>
    * URL url = new URL(getCodeBase(), "/servlet/ServletName");
    * HttpMessage msg = new HttpMessage(url);
    * // Parameters may optionally be set using java.util.Properties
    * Properties props = new Properties();
    * props.put("name", "value");
    * // Headers, cookies, and authorization may be set as well
    * msg.setHeader("Accept", "image/png"); // optional
    * msg.setCookie("JSESSIONID", "9585155923883872"); // optional
    * msg.setAuthorization("guest", "try2gueSS"); // optional
    * InputStream in = msg.sendGetMessage(props);
    * </pre></blockquote>
    * <p>
    * This class is loosely modeled after the ServletMessage class written
    * by Rod McChesney of JavaSoft.
    * @author <b>Jason Hunter</b>, Copyright &#169; 1998
    * @version 1.3, 2000/10/24, fixed headers NPE bug
    * @version 1.2, 2000/10/15, changed uploaded object MIME type to
    * application/x-java-serialized-object
    * @version 1.1, 2000/06/11, added ability to set headers, cookies,
    and authorization
    * @version 1.0, 1998/09/18
    public class HttpMessage {
    URL servlet = null;
    Hashtable headers = null;
    * Constructs a new HttpMessage that can be used to communicate with the
    * servlet at the specified URL.
    * @param servlet the server resource (typically a servlet) with which
    * to communicate
    public HttpMessage(URL servlet) {
    this.servlet = servlet;
    * Performs a GET request to the servlet, with no query string.
    * @return an InputStream to read the response
    * @exception IOException if an I/O error occurs
    public InputStream sendGetMessage() throws IOException {
    return sendGetMessage(null);
    * Performs a GET request to the servlet, building
    * a query string from the supplied properties list.
    * @param args the properties list from which to build a query string
    * @return an InputStream to read the response
    * @exception IOException if an I/O error occurs
    public InputStream sendGetMessage(Properties args) throws IOException {
    String argString = ""; // default
    if (args != null) {
    argString = "?" + toEncodedString(args);
    URL url = new URL(servlet.toExternalForm() + argString);
    // Turn off caching
    URLConnection con = url.openConnection();
    con.setUseCaches(false);
    // Send headers
    sendHeaders(con);
    return con.getInputStream();
    * Performs a POST request to the servlet, with no query string.
    * @return an InputStream to read the response
    * @exception IOException if an I/O error occurs
    public InputStream sendPostMessage() throws IOException {
    return sendPostMessage(null);
    * Performs a POST request to the servlet, building
    * post data from the supplied properties list.
    * @param args the properties list from which to build the post data
    * @return an InputStream to read the response
    * @exception IOException if an I/O error occurs
    public InputStream sendPostMessage(Properties args) throws IOException {
    String argString = ""; // default
    if (args != null) {
    argString = toEncodedString(args); // notice no "?"
    URLConnection con = servlet.openConnection();
    // Prepare for both input and output
    con.setDoInput(true);
    con.setDoOutput(true);
    // Turn off caching
    con.setUseCaches(false);
    // Work around a Netscape bug
    con.setRequestProperty("Content-Type",
    "application/x-www-form-urlencoded");
    // Send headers
    sendHeaders(con);
    // Write the arguments as post data
    DataOutputStream out = new DataOutputStream(con.getOutputStream());
    out.writeBytes(argString);
    out.flush();
    out.close();
    return con.getInputStream();
    * Performs a POST request to the servlet, uploading a serialized object.
    * <p>
    * The servlet can receive the object in its <tt>doPost()</tt> method
    * like this:
    * <pre>
    * ObjectInputStream objin =
    * new ObjectInputStream(req.getInputStream());
    * Object obj = objin.readObject();
    * </pre>
    * The type of the uploaded object can be determined through introspection.
    * @param obj the serializable object to upload
    * @return an InputStream to read the response
    * @exception IOException if an I/O error occurs
    public InputStream sendPostMessage(Serializable obj) throws IOException {
    URLConnection con = servlet.openConnection();
    // Prepare for both input and output
    con.setDoInput(true);
    con.setDoOutput(true);
    // Turn off caching
    con.setUseCaches(false);
    // Set the content type to be application/x-java-serialized-object
    con.setRequestProperty("Content-Type",
    "application/x-java-serialized-object");
    // Send headers
    sendHeaders(con);
    // Write the serialized object as post data
    ObjectOutputStream out = new ObjectOutputStream(con.getOutputStream());
    out.writeObject(obj);
    out.flush();
    out.close();
    return con.getInputStream();
    * Sets a request header with the given name and value. The header
    * persists across multiple requests. The caller is responsible for
    * ensuring there are no illegal characters in the name and value.
    * @param name the header name
    * @param value the header value
    public void setHeader(String name, String value) {
    if (headers == null) {
    headers = new Hashtable();
    headers.put(name, value);
    // Send the contents of the headers hashtable to the server
    private void sendHeaders(URLConnection con) {
    if (headers != null) {
    Enumeration enum = headers.keys();
    while (enum.hasMoreElements()) {
    String name = (String) enum.nextElement();
    String value = (String) headers.get(name);
    con.setRequestProperty(name, value);
    * Sets a request cookie with the given name and value. The cookie
    * persists across multiple requests. The caller is responsible for
    * ensuring there are no illegal characters in the name and value.
    * @param name the header name
    * @param value the header value
    public void setCookie(String name, String value) {
    if (headers == null) {
    headers = new Hashtable();
    String existingCookies = (String) headers.get("Cookie");
    if (existingCookies == null) {
    setHeader("Cookie", name + "=" + value);
    else {
    setHeader("Cookie", existingCookies + "; " + name + "=" + value);
    * Sets the authorization information for the request (using BASIC
    * authentication via the HTTP Authorization header). The authorization
    * persists across multiple requests.
    * @param name the user name
    * @param name the user password
    public void setAuthorization(String name, String password) {
    String authorization = Base64Encoder.encode(name + ":" + password);
    setHeader("Authorization", "Basic " + authorization);
    * Converts a properties list to a URL-encoded query string
    private String toEncodedString(Properties args) {
    StringBuffer buf = new StringBuffer();
    Enumeration names = args.propertyNames();
    while (names.hasMoreElements()) {
    String name = (String) names.nextElement();
    String value = args.getProperty(name);
    buf.append(URLEncoder.encode(name) + "=" + URLEncoder.encode(value));
    if (names.hasMoreElements()) buf.append("&");
    return buf.toString();
    }

  • How to get the data from pcl2 cluster for TCRT table.

    Hi frndz,
    How to get the data from pcl2 cluster for tcrt table for us payroll.
    Thanks in advance.
    Harisumanth.Ch

    PL take a look at the sample Program EXAMPLE_PNP_GET_PAYROLL in your system. There are numerous other ways to read payroll results.. Pl use the search forum option & you sure will get a lot of hits..
    ~Suresh

  • How to create EVENTS for a View Cluster.

    Hi Tech Gurus,
    I have created a view cluster on 5 tables. I need to do a validation and this can be done by using events. But i am unable to create a EVENT for the View Cluster. Could anyone please tell me how to create events for a View Cluster.
    Thanks in advance for your esteemed replies.
    Regards,
    Raghavendra Goutham P.

    Hello Pasapula
    When you are in the View Cluster maintenance dialog (SE54) click on dialog "Events".
    Below the field for the view cluster you have an additional field <b>FORM routines main program</b>. There you have to add the main program containing the FORM routines called by the VC events.
    For example: I had defined a normal report containing an include with all the FORM routines. The report contains only the following lines of coding:
    report zus_0120_u1.
    * Common Data und access routines for user exits in VC maintenance
    include LSVCMCOD.
    include  zus_0120_f1. "FORM routines for VC events
    Now in the "Events" dialog of the view cluster maintenance you assign your FORM routines to the events.
    Regards
      Uwe

  • How to get communication data in CRM 7.0

    In CRM 7.0 with CCS active.
    How to get communication data (Current phone #) that is presently active while creating Interaction Record or during account confirmation.
    Thanks,
    Nilesh P.

    Hi,
    This problem is related to IC and not related to Marketing Campaign.
    At this movement I hv resolved this problem by storing phone # in memory variable by some other way.
    But I would be more interested to know Communication Data in 'Context area' of IC.
    Thanks & Regards,
    Nilesh P.

  • Signed applet communication on Mac

    In Denmark homebanking is goin on the net with NetBank. My bank postulates that Mac users cannot participate, as signed applet communication is not supported on Macs.
    I find it hard to believe an suspect that ActiveX components are the crook here.
    Can anybody confirm my suspicion. Or clear my Bank :-)
    I am Macin' 9.0.4ie - MRJ 2.2.5 . Explorer 5.0 or Netscape 6.0

    The bank probably says that because it doesn't have any Macs to test it on. Signed applets do work on Macs. However, not all of JRE 1.1 may be implemented in NS 4 or IE 5.0.
    I think providing applet only access to Netbanking is a really dumb idea. Fortunately, my bank has not gone the applet route and I can use netbanking services just fine on my Mac with 128 bit encryption.
    If I were you, I would just switch to a bank that is more Mac friendly...

  • How to find which transparent tables compose cluster tableuFF1AKONV

    How to find which transparent tables compose cluster table&#65306;KONV

    Hi,
    Welcome to SDN.
    Try doing this ....
    1). Goto se12 and display the table BSEG
    2). Click on the Delivery & Maintenanace tab
    3). Double click on the Pool/Cluster field
    4). On the next screen do a where used list
    You will find all the related tables.
    Regards,
    Amit
    Reward all helpful replies.

  • Servlet/Applet communication, data limit?

    I have an applet that uses a servlet as a proxy to load/retrieve images from an Oracle database. I have a problem when trying to retrieve images larger than 9-10kb from the database. When using JDBC from a Java Application I don't have any probelms but through the Applet-Servlet configuration I do.
    I use the following code in the Applet:
    URL url =new URL("http","myserver",myport,"/servlet/MyServlet");
    HttpURLConnection imageServletConn = (HttpURLConnection)url.openConnection();
    imageServletConn.setDoInput(true);
              imageServletConn.setDoOutput(true);
              imageServletConn.setUseCaches(false);
    imageServletConn.setDefaultUseCaches (false);
    imageServletConn.setRequestMethod("GET");
    byte buf[] = new byte[imageServletConn.getContentLength()];
    BufferedInputStream instr = new BufferedInputStream(imageServletConn.getInputStream());
    instr.read(buf);
    Image image = Toolkit.getDefaultToolkit().createImage(buf);
    // then code to display the image
    And the following for the Servlet:
    public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    response.setContentType("image/gif");
    byte[] buff = loadImage(); // this method returns a byte array representing the image.
    response.setContentLength(contentLength);//contentLength is the size of the image
    OutputStream os = response.getOutputStream();
    os.write(buff);
    os.close();
    thanks in advance!

    thanks for your replay,
    I tried your suggestion but whatever I do it seems that tha applet only brings the first 5-10k of the image from the servlet. This is the value I get from instr.read() or any other type of read method. The value of bytes is not always the same.
    Now I also have something new. For images greater than 100k or so I get this error:
    java.io.IOException: Broken pipe
         at java.net.SocketOutputStream.socketWrite(Native Method)
         at java.net.SocketOutputStream.socketWrite(Compiled Code)
         at java.net.SocketOutputStream.write(Compiled Code)
         at java.io.BufferedOutputStream.write(Compiled Code)
         at org.apache.jserv.JServConnection$JServOutputStream.write(Compiled Code)
         at java.io.BufferedOutputStream.write(Compiled Code)
         at java.io.FilterOutputStream.write(Compiled Code)
         at interorient.DBProxyServlet.doGet(Compiled Code)
         at javax.servlet.http.HttpServlet.service(Compiled Code)
         at javax.servlet.http.HttpServlet.service(Compiled Code)
         at org.apache.jserv.JServConnection.processRequest(Compiled Code)
         at org.apache.jserv.JServConnection.run(Compiled Code)
         at java.lang.Thread.run(Compiled Code)
    I am using the Oracle Internet application server (ias 9i) which actualy uses the apache web listener.
    It seems that this servlet-applet communication is really unstable. If you have anything that may help me it will be greatly appriciated. You can even e-mail me at [email protected]
    thanks!

  • How an applet can connect to a data base?

    how an applet can connect to a data base?

    You need to set up a policy, it's a bit convoluted, see http://developer.java.sun.com/developer/onlineTraining/Programming/BasicJava1/dba.html#applet for more.

  • How does the communication will happened between SOA-Composer(where DVM file resides) and EM console (Where composite resides)?

    How does the communication will happened between SOA-Composer(where DVM file resides) and EM console (Where composite resides)?
    And also i would like to how A business rule(Which will be resides in SOA_COMPOSER) will be communicated to Soa Composite(Resides in EM Console)?

    whenever you deploy a new composite it gets stored in the MDS data
    store, i.e. the metadata service and not the dehydration store (the
    SOAINFRA database).
    Composer works directly with the MDS schema.
    EM reads the same schema (MDS) to see what composite are deployed on the
    partitions.
    All runtime instance data is stored in the SOAINFRA database.
    Hope this helps,
    Anatoli

  • Inter Applet Communication across frames - Help Needed

    I am trying inter applet communication across frames. For this to happen I am using an intermidiate
    class which registers two applets and whenever any applet needs reference of other applet it gets it
    through this class.
    The page is an important part of a navigation link. So it is loaded many times while traversing through
    the site.
    Every time I load this page the applet does not paint itself (shows grey or background) and the browser
    stops responding. The machine needs to be restarted. This also happens when we keep that page idle for
    a long time (say 2 hours - session does not time out but applet hangs). I have used another thread object
    which is for utility and accesses the applet in the other frame every 10 seconds or so.
    When the applet hangs it does ot throw any exception or JVM error. This happens on certain machines
    evrytime and never on some machines. The applet hangs only in Microsoft IE 5 & 5.5 and never in Netscape
    4.x.
    What could be the problem?
    Can anyone help me with this problem? Its a deadline project and I can't get through.
    Thanks & Regards,
    Rahul

    Try making the register and getter methods of the intermediate class static synchronized. Then register the applets in their start() methods and unregister them in their stop() methods. Call the getter method of the intermediate class wherever you need access to another applet and never cache the instance you get. You may have to also synchronize all your start() and stop() methods to the intermediate class, as well as all methods that perform interapplet communication.
    Tell me what happenned ...

  • How to create communication channels

    Hi Experts,
    Please help me how to create communication channels and the uses of it.

    hi,
    DO NOT REPLY TO SUCH BASIC QUESTION
    Edited by: Prateek Raj Srivastava on Feb 22, 2011 2:10 AM

  • Applet to Applet communication in one browser process with 2 windows

    Applet to Applet communication in Same IE process bu in different IE windows
    I have two IE windows
    (1) base window
    (2) child window (created through wondow.open() and hence share the same IE process and same JVM)
    Now I have two applets in one in base window and other is in child window and I want to do applet to applet communication. Since both applets are in different windows so AppletContext will not work and I tried to use custom AppletRegistory class to keep each Applet in static Hashtable. Now here comes the problem, Each applet gets different copy of this static Hashtable. i have tried hard to find the reason why a static varible has multiple copies running in the same JVM. Then my friend told me about something called class loader which is according to him is different for each window. I have tried this with two different iframes but in same window and it works fine and the reason being is that they share the same JVM. But why this fails for different windows althougt they also have same JVM?
    I am using JRE v5 update 7 and IE6 on WIN XP SP2.
    Thanks in advance..

    Try this example :
    Files used :
    1). AppletCom.html
    2). First.java
    3). Second.java
    1).AppletCom.html
    <HTML>
    <BODY bgcolor="#FFFFFF" link="#0000A0" vlink="#000080">
    <LI><H2><I>Inter applet communication Applet</I></H2>
    <applet code=First.class name="theFirst" width=250 height=100></applet>
    <applet code=Second.class width=350 height=100></applet>
    <BR>
    Source First.java Second.java
    <P>
    <HR>
    <i>Last updated 8/5/97 Martin Eggenberger</i>
    <HR>
    </BODY>
    </HTML>
    2). First.java
    import java.awt.*;
    <applet code="First" width="200" height="200">
    </applet>
    public class First extends java.applet.Applet {
    //Variables for UI
    Label lblOutput;
    public void init() {
    //Create the UI
    add(new Label("The First applet."));
    lblOutput = new Label("Click on a button in the Second applet.");
    add(lblOutput);
    public Color getcc()
    return Color.pink;
    public String getnm(int a,int b)
    int cnt=a+b;
    String str;
    str="Sum is :_________"+cnt;
    return str;
    public boolean handleEvent(Event event) {
    if ("One".equals(event.arg)) {
    lblOutput.setText("You clicked: One");
    return true;
    } else if ("Two".equals(event.arg)) {
    lblOutput.setText("You clicked: Two");
    return true;
    } else if ("Three".equals(event.arg)) {
    lblOutput.setText("You clicked: Three");
    return true;
    return super.handleEvent(event); }
    3). Second.java
    import java.awt.*;
    import java.applet.*;
    <applet code="Second.java" width="200" height="200">
    </applet>
    public class Second extends java.applet.Applet {
    //Declare the UI variables
    Button btnOne;
    Button btnTwo;
    Button btnThree;
         Applet f;
    Label lb;
    public void init() {
    //Build the UI
    btnOne = new Button("One");
    add(btnOne);
    btnTwo = new Button("Two");
    add(btnTwo);
    btnThree = new Button("Three");
    add(btnThree);
    lb=new Label("SUNO RE KAHANI TERI MERI SHHHHHHH");
    add(lb);
    setLayout(new FlowLayout());
    // lb.setSize(100,100);
    public boolean handleEvent(Event event) {
    if (event.id == Event.ACTION_EVENT && event.target == btnOne) {
         f = getAppletContext().getApplet(new String("theFirst"));
    First applet1=(First)f;
    // int cnt=applet1.givenum(22,25);
    // String str="Sum is:"+cnt+" Fine";
    String str=applet1.getnm(22,25);
    lb.setText(str);
    Color cl=applet1.getcc();
    setBackground(cl);
    return f.handleEvent(event);
    } else if (event.id == Event.ACTION_EVENT && event.target == btnTwo) {
    f = getAppletContext().getApplet(new String("theFirst"));
    return f.handleEvent(event);
    } else if (event.id == Event.ACTION_EVENT && event.target == btnThree) {
    f = getAppletContext().getApplet(new String("theFirst"));
    return f.handleEvent(event);
    return super.handleEvent(event);
    I had this example, so i am sharing it as it is.. instead of giving you any link for tutorial... hope this helps.
    Regards,
    Hiten

  • Is jre1.4 still support javascript to applet communication?

    is jre1.4 still support javascript to applet communication?
    I can't get the method in applet from javascript in jre1.4. Are there have a different way to communication?

    I have a similiar problem. Left a post in the Signed Applet board. I can get the methods called on my applet when operating over HTTP, but when I am on a page served from HTTPS, the browser chews up memory, goes to 100% processor utilization, and the method is never called. This is with the 1.4 plugin.
    Suppose this is related ?

  • How many SECONDARY INDEXES are created for CLUSTER TABLES?

    how many SECONDARY INDEXES are created for CLUSTER TABLES?
    please explain.

    There seems to be some kind of misunderstanding here. You cannot create a secondary index on a cluster table. A cluster table does not exist as a separate physical table in the database; it is part of a "physical cluster". In the case of BSEG for instance, the physical cluster is RFBLG. The only fields of the cluster table that also exist as fields of the physical cluster are the leading fields of the primary key. Taking again BSEG as the example, the primary key includes the fields MANDT, BUKRS, BELNR, GJAHR, BUZEI. If you look at the structure of the RFBLG table, you will see that it has primary key fields MANDT, BUKRS, BELNR, GJAHR, PAGENO. The first four fields are those that all cluster tables inside BSEG have in common. The fifth field, PAGENO, is a "technical" field giving the sequence number of the current record in the series of cluster records sharing the same primary key.
    All the "functional" fields of the cluster table (for BSEG this is field BUZEI and everything beyond that) exist only inside a raw binary object. The database does not know about these fields, it only sees the raw object (the field VARDATA of the physical cluster). Since the field does not exist in the database, it is impossible to create a secondary index on it. If you try to create a secondary index on a cluster table in transaction SE11, you will therefore rightly get the error "Index maintenance only possible for transparent tables".
    Theoretically you could get around this by converting the cluster table to a transparent table. You can do this in the SAP dictionary. However, in practice this is almost never a good solution. The table becomes much larger (clusters are compressed) and you lose the advantage that related records are stored close to each other (the main reason for having cluster tables in the first place). Apart from the performance and disk space hit, converting a big cluster table like BSEG to transparent would take extremely long.
    In cases where "indexing" of fields of a cluster table is worthwhile, SAP has constructed "indexing tables" around the cluster. For example, around BSEG there are transparent tables like BSIS, BSAS, etc. Other clusters normally do not have this, but that simply means there is no reason for having it. I have worked with the SAP dictionary for over 12 years and I have never met a single case where it was necessary to convert a cluster to transparent.
    If you try to select on specific values of a non-transparent field in a cluster without also specifying selections for the primary key, then the database will have to do a serial read of the whole physical cluster (and the ABAP DB interface will have to decompress every single record to extract the fields). The performance of that is monstrous -- maybe that was the reason of your question. However, the solution then is (in the case of BSEG) to query via one of the index tables (where you are free to create secondary indexes since those tables are transparent).

Maybe you are looking for

  • Using values in the right side of the shuttle on another page.

    Hello All, On page 1 I have a shuttle item. I select some values and move them to the right side of the shuttle. Now I need to navigate to a second page (currently I'm controlling the navigation with a button) and pass the values from the right side

  • Extraction from XI

    Hi, Please provide steps to extract XML data from XI to BI using proxy.Give the detail steps starting from XI till loading to the Datatargets in BI. Thanks Tarak

  • Redo logs switches too frequent after migrating the db to different server

    Dear Experts, A couple of days back, we migrated our database (belonging to EBusiness Suite) to a different server, to get good performance benefit. The database is 10.2.0.4 and it was migrated from AIX 5.3 to Linux x86 64. Users are happy with the p

  • IDoc Adapter 151 - Transaction aborted

    Hi fellows, after patching our XI-System to SP19 we try to do a new IDoc2File Szenario. We have one from the old XI-Level which runs really good. It's going from external R/3 to our XI server into the file system. the new scenario has some selfmade I

  • Best way to update footer with book version #

    Hi all, I have a book and that book has a version number, 4.0. This number is on the cover page, and in the footer of the document as well. What I would like to do is have that version number in the footer update whenever I change the version number