Piggy back values with every method invocation

Hi,
I have a setup where , many of my application users are mapped to
Realm Users of WLS.
I do the initial mapping of Application users to RealmUsers
(example: harish --> joeuser and scott --> joeuser) and
create a InitialContext using "joeuser", when "harish" logs in.
All further accesses ( lookup etc.. ) on the EJB's are made using the
InitialContext created using "joeuser" .
("harish" does not exist in the WLS realm).
Now, when I call a EJB , I need to know at the EJB end that
the user is actually "harish" ...so that I cud use this information
for
logging purposes..
Is there any way of sending this information("harish") , "piggyback"
with every request ?
NOTE: I do not want to include a applicationuser parameter to every
method call.
Am using WLS 6.1 SP2.
Any info will be highly appreciated.
Thanks
Harish

Hi
u can create a static startup class which will read the mappings from a
XML file in a static block and all apps can query this static class for
getting the external or internal user id.
thanx
ssk
Harish Murthy wrote:
Hi,
I have a setup where , many of my application users are mapped to
Realm Users of WLS.
I do the initial mapping of Application users to RealmUsers
(example: harish --> joeuser and scott --> joeuser) and
create a InitialContext using "joeuser", when "harish" logs in.
All further accesses ( lookup etc.. ) on the EJB's are made using the
InitialContext created using "joeuser" .
("harish" does not exist in the WLS realm).
Now, when I call a EJB , I need to know at the EJB end that
the user is actually "harish" ...so that I cud use this information
for
logging purposes..
Is there any way of sending this information("harish") , "piggyback"
with every request ?
NOTE: I do not want to include a applicationuser parameter to every
method call.
Am using WLS 6.1 SP2.
Any info will be highly appreciated.
Thanks
Harish

Similar Messages

  • Ejbload() on CMP with transaction = supports - why called before every method?

    If an entity bean (CMP v2) has its transaction attrib "supports", why
    when a client (ejb/servlet/jsp) calls its business methods does WLS
    call ejbLoad() before every method call? Note that the calls do not
    occur inside a transaction!
    This is not intuitive to me. I would think that ejbLoad() would be
    called once when the bean is activated and then all business methods would
    access that data.
    Note that if you put the entity bean behind a session bean with a
    transaction attrib "Required", then the ejbLoad() gets called once no
    matter how many business methods are called from the session bean.
    This is (obivously) correct.
    Why is this relevant? The latest java petstore demo essentially calls
    EJBLocal's from jsp (via taglib's) - I guess no different from WLS
    EJB to taglib product - where the fine grained getter methods are
    called. From what I gather, this means that every one of the jsp
    get methods results in a database read! This can't be right!
    What am I missing? As above, if the entity bean has "supports"
    and is called from a jsp, it appears that ejbLoad()/ejbStore()
    would be called for every jsp taglib invocation.
    Glenn

    "Glenn R. Kronschnabl" wrote:
    Rob,
    Thanks for your reply. This implies that even EJBLocals with fine
    grained getter methods should never be used outside a tx scope.Yes, unless you are using Read-Only entity beans which cache data for longer
    periods of time.
    Even
    though you bypass the RMI semantics, you'll be killed by the local tx.
    Which to me says that using EJB's from JSP (even via tags) is a bad
    idea because each getter method will result in a database read/write,
    (unless you go with a readonly EJB as you stated).
    Accessing transactional entity beans via tags is probably a bit off. You
    could start the tx in the JSP or the tag library, but I don't really like
    that pattern much. I prefer making the tags more coarse-grained and having
    the tags talk to a stateless session bean which in turn talks to the entity
    beans.
    >
    Unfortunately, I've been seeing some threads on the net advocating
    using EJBLocals with tx=supports because one of the most common
    patterns has session beans (where you can specify your desired tx)
    in front of entity beans (so you're set methods are protected via
    the session bean tx),RIght, I think Required or Mandatory is a better choice for the entity beans
    here.
    but then you can use the EJBLocal (via tags)
    on a JSP page (no tx) to view the data via fine grained getter
    methods.Other than the performance issues, I dislike this because it exposes the
    entity bean directly to the JSP. If I have to go through an interface (the
    session bean) to access the entity bean, then I shouldn't have another route
    to access the entity bean directly.
    -- Rob
    >
    As you state, this is a disaster because each getter method
    will run in a local tx, requiring a database read/write. Oouch!
    Glenn
    On Thu, 06 Dec 2001 17:08:07 -0600, Rob Woollen wrote:
    First off, I wouldn't recommend that you ever run any EJB with the
    'supports' transaction attribute. If you want transactional behavior
    use Required, RequiresNew, or Mandatory. If you want to run in an
    unspecified tx, use NotSupported or Never.
    WLS runs entity beans with an unspecified tx in their own local tx.
    That's why you see the reads and writes on the method call boundary.
    Your scheme of only reading when the bean is activated could make the
    bean's data out of sync with the underlying database. That's acceptable
    in many cases, and that's why we have the Read-Only entity bean option.
    It gives you exactly what you'd like.
    -- Rob
    "Glenn R. Kronschnabl" wrote:
    If an entity bean (CMP v2) has its transaction attrib "supports", why
    when a client (ejb/servlet/jsp) calls its business methods does WLS
    call ejbLoad() before every method call? Note that the calls do
    not occur inside a transaction!
    This is not intuitive to me. I would think that ejbLoad() would be
    called once when the bean is activated and then all business methods
    would access that data.
    Note that if you put the entity bean behind a session bean with a
    transaction attrib "Required", then the ejbLoad() gets called once no
    matter how many business methods are called from the session bean. This
    is (obivously) correct.
    Why is this relevant? The latest java petstore demo essentially calls
    EJBLocal's from jsp (via taglib's) - I guess no different from WLS EJB
    to taglib product - where the fine grained getter methods are called.
    From what I gather, this means that every one of the jsp get methods
    results in a database read! This can't be right! What am I missing? As
    above, if the entity bean has "supports" and is called from a jsp, it
    appears that ejbLoad()/ejbStore() would be called for every jsp taglib
    invocation.
    Glenn
    AVAILABLE NOW!: Building J2EE Applications & BEA WebLogic Server
    by Michael Girdley, Rob Woollen, and Sandra Emerson
    http://learnWebLogic.com
    [att1.html]

  • If a  class method exporting a value with the generic type 'data'.

    Then how can I get the information?
    For exmple.
    cl_my_clss->get_value( exporting ev_data = .... ) .
    ev_data is a type of data.
    I can not use DATA : lv_mine type data. because generic data should be used in formal parameter, however , if I use a field symbol, how to assign value with out knowing the data type?
    Best regards,

    Hi Blake,
    As per my understanding,
    You are getting the data type from the database table....
    You want to use the same data type....
    Lets say for example:
    You have a db table x with field y having data type Z.
    What you do is that, while declaring the data type for the attribute in the method use the reference as table_name-field_name(x-y).
    Or....
    use ANY. This will give you a chance to map any field type to this method....
    Note: Using ANY will limit the syntax that you can use within the method......
    Regards,
    Kunjal

  • My screen opened, and with every click the page (letters/images) got bigger. I can not get it to return to normal image size. I have to use the slide bar to read across the page. What do i do to correct it back to normal size???

    Question
    My screen opened, and with every click the page (letters/images) got bigger. I can not get it to return to normal image size. I have to use the slide bar to read across the page. What do i do to correct it back to normal size???

    Hi jholzworth,
    It sounds like you might have accidentally hit the zoom button. Try hitting ''CTRL + 0'' to return it to normal size. Just so you are aware, ''CTRL'' and ''+'' will zoom in and ''CTRL'' and ''-'' will zoom out.
    Hopefully this helps!

  • Generic method invocations with explicit type parameters

    If I interpret the JSR14 public draft spec (June 23, 2003) section 5.6 correctly the following method invocations with explicit type parameters should compile: package generics;
    public class G121 {
      void f() {
        this.<String>f2();
        <String>f2(); // compilation error
        <String>f3(); // compilation error
      <T> void f2() {
      static <T> void f3() {
    }but the class does not compile: jc -J-showversion generics\G121.javajava version "1.5.0-beta"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta-b32c)
    Java HotSpot(TM) Client VM (build 1.5.0-beta-b32c, mixed mode)
    generics\G121.java:6: illegal start of expression
        <String>f2(); // compilation error
                ^
    generics\G121.java:8: illegal start of expression
        <String>f3(); // compilation error
                ^
    2 errors
    >A bug or do I miss something?

    I get this error:
    LineCount.java:104: cannot find symbol
    symbol : method <java.io.File>sort(java.util.List<java.io.File>)
    location: class java.util.Collections
    Collections.<File>sort( list );
    ^
    1 errorYou don't need the explicit type argument there, but anyway...
    If you look at the docs for Collections.sort(List<T> list) you'll see it is declared as:
    static <T extends Comparable<? super T>> void Collections.sort(List<T> list) Unfortunately, although File implements Comparable, it doesn't actually implement Comparable<File> or even Comparable<Object>, so I guess it can't satisfy the bound.
    You can get it to compile by removing the explicit type argument and casting to the raw type List, but that's not very nice.
    This seems like an oversight to me - File already has both int compareTo(Object o) and int compareTo(File pathname) so I don't see why it can't implement Comparable<File>. This isn't the only such case in the API though, so maybe I'm missing something.
    Mark

  • How to solve the "Method invocation failed" error in script?

    Hello,
    I'm trying to modify the script that enumerates all the txt (csv) files on folder and deletes empty columns, but with no luck. The script is working when I execute it on single csv file. But when I put script on loop, it generates errors:
    Method invocation failed because [System.Management.Automation.PSCustomObject] does not contain a method named 'split'.
    At C:\scripts\populate.ps1:25 char:1
    + $b = $line.split(",")
    + ~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: (split:String) [], RuntimeException
        + FullyQualifiedErrorId : MethodNotFound
    The script looks the following:
    $files = Get-ChildItem C:\scripts\Results\csv\* -include *.txt
    #Process files by performing a search and replace
    foreach ($infile in $files)
    $infilen = 'C:\scripts\Results\csv\'+[io.path]::GetFileName($infile)
    $infile = import-csv $infilen
    ##remove blank coloumns##
    $cStore = @() # array to store used column numbers
    $rNumber = 0
    foreach ($line in $infile)
    if ($rNumber -eq 0)
    {# ignore header
    else
    $b = $line.split(",")
    $fieldNum = 0
    foreach ($field in $b)
    if ($field -ne '')
    if ($cStore -notcontains $fieldNum) {$cStore += $fieldNum}
    $fieldNum += 1
    $rNumber +=1
    # array $cStore now contains column numbers with values
    $cStore = $cStore | sort
    foreach ($line in $infile)
    $nLine = ""
    $c = $line.split(",")
    foreach ($ar in $cStore)
    $nLine += $c[$ar]+","
    # remove trailing ,
    $nLine = $nLine.Substring(0, $nLine.Length-1)
    $fnFriendly = [io.path]::GetFileNameWithoutExtension($infile)
    $result=$fnFriendly+'cl.txt'
    Write-Output $nLine >> $result
    Also I have found the explanation on this error on this
    link but it seems this is not the case.  Can you help to solve this?
    Thanks!

    You are importing a CSV file which implies that you are creating an object (pscustomobject) and each item in that object is represented by $line. The issue is that this $line has multiple properties (for each column of the CSV) that you need to decide
    on which one to split:
    $c = $line.propertyname.split(",")
    I'm not sure, but it seems that if you are trying to split by a comma, then maybe you are assuming that you did something similar to a
    get-content on the file in which the original approach that you have done would work.
    Boe Prox
    Blog |
    Twitter
    PoshWSUS |
    PoshPAIG | PoshChat |
    PoshEventUI
    PowerShell Deep Dives Book

  • Generating I-Doc with Payment Method - D

    HI all,
    I am trying to process direct deposit with the payment method 'D' to generate the I-Doc.
    SCENARIO - 1:
    In FBZP, under 'Payment Medium' section, I am using the classic program RFFOEDI1. (here do i need to give value for "KEY IN CODE LINE")
    F110 payment run with pymt method D is successful.
    When I tried to generate I-Doc in SE38, with RFFOEDI1, it is giving a message "No records found"
    SCENARIO - 2:
    In FBZP, under 'Payment Medium', if i use PMW 'Payment Medium Workbench', ACH-CCD
    which program do i need to run in SE38 to generate I-Doc. Is that FPM_ACH???
    Please suggest on this.
    Thanks!

    Hi Sri,
    For populating IDOC's using APP apart from giving payment program RFFOEDI1 there are other settings which need to be done.
    1. Creation of Partner profile for partner type Bank in WE20
    2. Assign this partner profile in FBZP for the house bank.
    3. Under payment method in country, give the payment program RFFOEDI1 for the payment method for which u need IDOC's
    4. Select the sap script form in payment method under comapny code as follows payment medium international in that  EDI accompanying sheet, same select for next form also.
    5. Give the variant in F110 print/data entry tab and save the variant.
    These are the required configurations, Check once whether u had done or not, get back to me for further clarifiactions.
    regards
    srikanth.

  • Detecting the source of a method invocation.

    Within a given method, is there a way to detect what class/method made the invocation call?
    I need to find a way to modify instance variables within a method, based on the invoking class ... I thought of navigating back through the Stack, but I am working with a multi-threaded application so I fear that I cannot absolutely depend on the last Stack call being the actual invoking class/method. Any ideas? - please help.
    Many thanks,
    Thomas

    How does one access the method invocation stack?I'm not sure if an easier way exists, but you can extend SecurityManager to fetch the Class context of the current Thread, which will provide you with an array of Class obejcts, ordered according to the method invocation stack. Thus, you can determine what Class invoked a particular method, but you can not determine what Object (not via the SecurityManager funcationality).
    Here is a simple class I often use for such a need (excuse any formating issues- or misspellings in the documenation)... ... although, it should be stated, this class may not work in certain environments- specifically ones that deny permission "createSecurityManager".
    * This class provides static utility methods for retrieving information
    * on the class context.  The methods in this class can provide a
    * resource with a list of the classes that invoked it, thus allowing
    * clases to determine if a particular method is being accessed by
    * the proper caller or allow Class variables to be initialized statically,
    * with out having to instantiate the type.
    * <p>This class is meant to provide simple functionality in familiar
    * environments.  Its funcationality may not work properly when executing
    * in an enviroment with strigent security permissions.  Specifically, if
    * permission is denied to construct a new SecurityManager instance, the
    * methods of this class will fail.
    * @author: Sean Flanerry
    public final class ClassLookup extends SecurityManager {
      private static final ClassLookup instance = new ClassLookup();
      private ClassLookup() { }
      * This method returns the class context for the current thread in format
      * <ul>
      * <li>Class for currently executing method
      * <li>Class that invoked the above method
      * <li>Class that invoked the above method...
      * </ul>
      * The first two elements in the returned array will be of type ClassLookup.
      * @see java.lang.SecurityManager#getClassContext()
      public static Class [] fetchClassContext() {
        return instance.getClassContext();
      * This method returns the Class that invoked this method.  This method
      * is used primarily by static initializers that have to retrieve a handle
      * to the java.lang.Class instance that wraps the current type, but that
      * can not instantiate the current type, eg <br>
      * <code>public static final Class currentClass = ClassLookup.getCallingClass();
      public static Class getCallingClass() {
        return instance.getClassContext()[3];
      * This returns the Class that invoked the current method on the calling
      * Class.  If for example, Race.startRace() invokes Runner.sprint(), Runner.sprint()
      * can determine what class invoked it by calling this method.  In other
      * words, this method lets other methods determine which class invoked
      * it.
      * <p>Remember that this method returns a Class instance for which
      * ever type contains the method which invoked the caller so the
      * Object returned by this method might be the caller's type if the
      * caller was spawned by a method with in the same class.  Consider,
      * <ul>
      * <li>Race.start() invokes
      * <li>Runner.sprint() which invokes
      * <li>Runner.fatigue()
      * </ul>
      * If Runner.fatigue() invokes this method, an instance of Runner.class will
      * be returned, <b>not</b> Race.class because fatigue was invoked by sprint.
      * <p>This method is typically used by resources that wish to determine
      * if the current method is being invoked via the proper context, ie the
      * invoking class is a trused resource.
      public static Class getInvokingClass() {
        return instance.getClassContext()[4];
      public static void main(String args[]) {
        Class [] c = fetchClassContext();
        for (int i = 0; i < c.length; i++) {
          System.out.println(c.getName());

  • Trouble in dynamic method invocation

    hai forum,
    Your previous responses on this topic 'method invocation' has greatly helped me in writing a code to invoke method dynamically.As some experts pointed out,the parameters had to be type casted.
    Please help me out of my latest trouble.I invoke only a particular method 'methodName' of a particular calss instance 'instance'.But when i run the code Exceptions are thrown for all the methods of that class whereas i require exceptions connected with "methodName" only.
    I just could not figure out my mistake, so please help me out.
    Thank you.
        private class MethodInvoke implements ActionListener
            private String methodName=""; //name of the method
            Object instance;                          //instance of the class
            private int paraNum=0;             //num of parameters
            public void setParameters(String methodName,Object instance,int paraNum)
                this.methodName = methodName;
                this.instance=instance;
                this.paraNum=paraNum;
            public void actionPerformed(ActionEvent e)
                 try
                           //TAKE PARAMETERS FROM USER USING TEXTFIELDS INTO AN ARRAY LIST
                        Component[] cList = textfieldPanel.getComponents();
                        ArrayList parameterList = new ArrayList(paraNum);
                        Object[] parameters = new Object[parameterList.size()];
                         for (int x = 0; x < paraNum; x++)
                                if (cList[x] instanceof JTextField)
                                    String value = ((JTextField) cList[x]).getText(); 
                                    parameterList.add(value);
                        Method[] allMethods = instance.getClass().getMethods();
                        Method method = null;
                        for (int i = 0; i < allMethods.length; i++)
                                if (allMethods.getName().equals(methodName))
    method = allMethods[i];
    break;
    if (method == null)
    throw new RuntimeException("Method not found");
    Class[] types = method.getParameterTypes();
    for (int i = 0; i < paraNum; i++)
    String values = (String)parameterList.get(i);
    if (types[i].equals(Integer.class))
    parameters[i] = new Integer(values);
    else if (types[i].equals(Long.class))
    parameters[i] = new Long(values);
    else if (types[i].equals(String.class))
    parameters[i] = values;
    else if (types[i].equals(Float.class))
    parameters[i]=new Float(values);
    else if (types[i].equals(Boolean.class))
    parameters[i]=new Boolean(values);
    else
    System.out.println("Do not support the data type");
    Object result = method.invoke(instance, parameters);
    System.out.println("Invoked result: " + result);
    catch(Exception e3)
    System.out.println(e3);

    This is the Emp class which iam calling.Hope this will help you.
    import java.io.*;
    public class Emp
         private String designation;
         private int salary;
         private int id;
         private String name;
         public Emp()
         public void setId(int i)
              id=i;
         public int getId()
              return id;
         public void setDesignation(String d)
              designation=d;
         public void setName(String d)
              name=d;
         public void setSalary(int s)
              salary=s;
         public String getDesignation()
              return designation;
         public int getSalary()
              return salary;
         public String getName()
              return name;
         public void setAll()
              try
                   System.out.println("Enter name:");
                   BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
                   String n=br.readLine();
                   setName(n);
                   System.out.println("Enter ID:");
                   setId(Integer.parseInt(br.readLine()));
                   System.out.println("Enter Designation:");
                   n=br.readLine();
                   setDesignation(n);
                   //System.out.println("Enter Salary:");
                   //setSalary(Integer.parseInt(br.readLine()));
              catch(Exception e)
         public void getAll()
              System.out.println("Name: "+getName()+"\n ID: "+getId()+
                        "\n Designation: "+getDesignation());
         public void pay(int w)
              getAll();
              System.out.println("Name: "+name+"\nAmount to be paid : "+w);
         /*public static void main(String[] args)
              Emp e=new Emp();
              e.setAll();
              e.getAll();
    }

  • I cannot log in to my mid 2012 12 core mac pro tower.  When trying it imputs about twenty characters, I have tried every method of restarting, safe, D diagnostic nothing affects the computer, I have done an erase and backup from time machine, just ke

    I have restored from time machine and tried every method of restarting nothing lets me sign in the computer imputs about 20 characters, I have scanned for virus, negative I have restored from time machine, can't download new 10X as I cannot log in to get it.  Any ideas?

    Hey I managed to figure this out about an hour before I got your response, wow a two year old keyboard and it's toast.  I have a Kensington keyboard I use with my Ipad so hooked that up, tried wirelessly, the went with a usb cord.  This has been the strangest 24 hours ever on my mac.  It was entering all kinds of jibberish into the log on box and since I  could not log on I thought it was other problems.  So, the good thing is I'm back to Maverick and not using Yose. which has not been a real good experience so far.  The chat with the tech at apple didn't have a clue, put me through two restores.  Oh, well live and learn thanks for the response so quickly, you were spot on.

  • PDF Size will increase in size dramatically with every submit.

    I have a PDF Form desinged using Adobe LiveCycle Desinger ES2.
    It has a submit button which will submit the form to the server (IIS and ASP.NET) using this javascript command:
    event.target.submitForm( {cURL: "http://server/ASPNETWebPage.ASPX", aPackets:["datasets","pdf"], cSubmitAs: "XDP"});
    On the server, from ASP.NET, I use the following code to extract the submitted "chunk" element and convert it from Base64 to Binary PDF File:
                fs = New System.IO.FileStream(mFormFileNameFolder, IO.FileMode.Create)
                bw = New System.IO.BinaryWriter(fs)
                ' Get chunk element form the submitted XML
                Dim srChunk As New StringReader(mXML.GetElementsByTagName("chunk")(0).InnerXml)
                Do While True
                    Dim theChunkLine As String
                    theChunkLine = srChunk.ReadLine
                    If Not String.IsNullOrEmpty(theChunkLine) Then
                        theReadBytes = theChunkLine.Length
                    Else
                        theReadBytes = 0
                        Exit Do
                    End If
                    Dim theBase64Length = (theReadBytes * 3 / 4)
                    Dim buffer() As Byte
                    buffer = Convert.FromBase64String(theChunkLine)
                    bw.Write(buffer)
                Loop
                bw.Close()
                bw = Nothing
                fs.Close()
                fs = Nothing
    The above code is working fine, and PDF is generted successfully.
    I have one problem.
    With every submit, the generated PDF Size will increase dramatically. I reported this to Adobe Support, and they cofirmed that this is by desing and that with every submit, the previous PDF State is saved, and the new state is added. That is why I get huge PDF File.
    I was told that the only way to solve this problem is to submit the form as PDF ONLY, and after I save the PDF File on a file system, I then must use Adobe Service/Process "exportData" to extract the XML Data from the PDF.
    I think this is really big change to me. I was hoping that there is a way to indentify the latest PDF State from the chunk element.
    Any help will be greatly appreciated.
    Tarek.

    Thanks a lot C. Myers,
    You explanation helped me understand what is happening.
    I have been following the same method for the past 4 years, and I was hit by this problem (OutOfMemoryException) only when some users started using image size more than 500KB. Then, I decided to report this problem.
    I was able to rewrite the code to convert from Base64 to binary using buffering:
    http://forums.asp.net/t/1662571.aspx/1?URGENT+Exception+OutOfMemoryException+thrown+when+w hen+converting+to+String+
    So far, I am not getting OutOfMemoryExceptions, but the PDF Size will continue to grow with every submit. However, if the all the images size is less than 50KB, the increase is not significant.
    Please allow me to ask this question:
    Is there a way to change the above code so that I can extract only the last version of the submitted PDF from the Data Stream "chunk" element ?
    Sooner or later, some one will notice that such PDF sizes are not logical. Even when the PDF does not have images, I have noticed in the past, some PDF Sizes (for Staff Profile Data Collection Form) are something like 15MB !!! I was not able to figure out why. But now I understand. I think the user must have submitted the form for saving many times.
    Now, things are OK. But, I will post back if this problem will fire back.
    Tarek.

  • Value change listener method does not refresh value

    Hi Frank,
    According to your documentation ADF Faces: How-to build dependent lists boxes with ADF and ADF Faces I have created dependent list box and it is working properly.
    Now in the similar way I have created a form where one attribute is set as select one choice and it takes value from a lov and this attribute have a value change listener event and when selecting a value for this attribute from lov, in backing bean it will set another attribute of the form and the value will be taken from the other field of the lov for the current row.
    But when I am running this, 1st time when I am selecting a value from lov, the 2nd attribute of the form gets its value but next time when I am selecting another value in LOV, the value in the other attribute is not changing accordingly.
    My original form is (test_date,machine_code,machine_no...)
    I have created LOV for machine_code.
    This LOV is --select machine_code,machine_no from machine_mast;
    This LOV returns machine_code to the machine_code field of my main form.
    For machine_code, I have created a value change listener method and set its autosubmit property to true and for machine_no field I have set its partial trigger property to the ID of machine_code field.
    The value change listener code is
    BindingContainer bindings = this.getBindings();
    DCIteratorBinding itr = (DCIteratorBinding)bindings.get("lov2_sqc0400_1Iterator");
    Row rw = itr.getRowAtRangeIndex(((Integer)valueChangeEvent.getNewValue()).intValue());
    Object machine_no= rw.getAttribute("MchnNo");
    inputText2.setValue(machine_no);
    Please help
    Regards/Thanks
    SK

    Hi All,
    Can anyone please help me?
    Thanks/Regards
    SK

  • Automatic Passing of parameters with every RMI Call

    We need the ability to automatically pass a couple of objects, both Strings in this case, with every RMI call we make from our clients (multiple clients) to the servers (multiple servers). Currently I'm using some code that Rickard �berg wrote a while ago that uses UnicastRef.marshalCustomCallData() and UnicastServerRef.unmarshalCustomCallData() so do this. I extended these 2 classes and rolled my own UnicastRemoteObject. This has worked out great but now I need to also use Custom Socket Factories, to get through the firewalls that our customer has. So I thought I could just extend UnicastRef2 and UnicastServerRef2 but when I do the servers never get
    bound to the RmiRegistry.
    We don't want to explicitly add these arguments to all our remote interfaces because we have a bunch of remote object classes and don't want to rely on the programmer sending the correct values or when writing new remote methods making sure that they these arguments are included.
    We're using 1.4.1, but this also fails with 1.3.1.
    The only thing I see in the logs is:
    Oct 2, 2002 1:53:39 PM sun.rmi.server.UnicastServerRef logCall
    FINER: RMI TCP Connection(1)-216.100.254.188: [216.100.254.188: sun.rmi.registry
    .RegistryImpl[0:0:0, 0]: void rebind(java.lang.String, java.rmi.Remote)]
    Oct 2, 2002 1:53:50 PM sun.rmi.server.UnicastServerRef logCall
    FINER: RMI TCP Connection(2)-216.100.254.188: [216.100.254.188: sun.rmi.registry
    .RegistryImpl[0:0:0, 0]: java.rmi.Remote lookup(java.lang.String)]
    Oct 2, 2002 1:53:50 PM sun.rmi.server.UnicastServerRef logCallException
    FINE: RMI TCP Connection(2)-216.100.254.188: [216.100.254.188] exception:
    java.rmi.NotBoundException: FileManager
    at sun.rmi.registry.RegistryImpl.lookup(RegistryImpl.java:106)
    at sun.rmi.registry.RegistryImpl_Skel.dispatch(Unknown Source)
    at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:342
    at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:207)
    at sun.rmi.transport.Transport$1.run(Transport.java:148)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
    at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:4
    60)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport
    .java:701)
    at java.lang.Thread.run(Thread.java:536)
    So anyone know why this doesn't work when I supply the SocketFactories?
    Is there a better way to accomplish this than extending sun.rmi.server classes (which was really easy)? I can supply the source for my classes if it helps, though my UnicastServerRef2 and UnicastRef2 classes are pretty simple.
    Mark.

    First, did you really bind the servers?
    Second, does it work with the socket factories but without your custom Ref classes? I would suspect the socket factories here. Do they have a reasonable override for the Object.equals() method?
    EJP

  • Filter af:outputText  value with some parameters before loading component

    I use jdeveloper 10.1.3 with web adf components.
    I want to show outputText component with some custom Object (item),
    <af:outputText value="#{bindings.item}">
    but before showing this component on the page , during runtime, this item object must be filtered with some parameters and then returned some string ( convert item object to string with parameters during runtime, before loading this outputText component).
    How can I do this?
    Maybe it needs some back beans or I am thinking to create custom component like outputText ,but how to do ?
    what is optimal disizion?
    can someone help me or someone can send some documentation?

    Hi,
    When u will bind Output Text with some method in Backing bean u will get a set(),get() methods along with a CoreOutputText variable, u can initialized the variable , and if u want to check any condition then before setting the value then check the condition in the constructor of the backing bean and then change the CoreOutputText value accordingly,which will set the corresponding value,in the UI
    Thanks

  • Why do system preferences revert back to default every time computer is restarted

    Cannot keep changes to System preferences.  All revert back to default every time computer is restarted.
    Also, all extensions, e.g. adblock, reinstall every time computer is restarted.
    <Personal information edited by Host>

    Back up all data before proceeding.
    This procedure will unlock all your user files (not system files) and reset their ownership, permissions, and access controls to the default. If you've intentionally set special values for those attributes on any of your files, they will be reverted. In that case, either stop here, or be prepared to recreate the settings if necessary. Do so only after verifying that those settings didn't cause the problem. If none of this is meaningful to you, you don't need to worry about it, but you do need to follow the instructions below.
    Step 1
    If you have more than one user, and the one in question is not an administrator, then go to Step 2.
    Triple-click anywhere in the following line on this page to select it:
    sudo find ~ $TMPDIR.. -exec chflags -h nouchg,nouappnd,noschg,nosappnd {} + -exec chown -h $UID {} + -exec chmod +rw {} + -exec chmod -h -N {} + -type d -exec chmod -h +x {} + 2>&-
    Copy the selected text to the Clipboard by pressing the key combination command-C.
    Launch the built-in Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Paste into the Terminal window by pressing command-V. I've tested these instructions only with the Safari web browser. If you use another browser, you may have to press the return key after pasting.
    You'll be prompted for your login password, which won't be displayed when you type it. Type carefully and then press return. You may get a one-time warning to be careful. If you don’t have a login password, you’ll need to set one before you can run the command. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator.
    The command may take several minutes to run, depending on how many files you have. Wait for a new line ending in a dollar sign ($) to appear, then quit Terminal.
    Step 2 (optional)
    Take this step only if you have trouble with Step 1, if you prefer not to take it, or if it doesn't solve the problem.
    Start up in Recovery mode. When the OS X Utilities screen appears, select
              Utilities ▹ Terminal
    from the menu bar. A Terminal window will open. In that window, type this:
    res
    Press the tab key. The partial command you typed will automatically be completed to this:
    resetpassword
    Press return. A Reset Password window will open. You’re not going to reset a password.
    Select your startup volume ("Macintosh HD," unless you gave it a different name) if not already selected.
    Select your username from the menu labeled Select the user account if not already selected.
    Under Reset Home Directory Permissions and ACLs, click the Reset button.
    Select
               ▹ Restart
    from the menu bar.

Maybe you are looking for