Is it possible to get scope Variables in an EJB SessionBean

Hello!
I need to get scpoe variables in an EJB SessionBean. Is it possible?
Thnaks in advance!

ADFContext ctx = ADFContext.getCurrent();
Map<String, Object> map = ctx.getViewScope();
For example

Similar Messages

  • Is it possible to get a variable if I only know the variable by it'

    Is it possible to get a variable if I only know the variable by it's string name?
    In my case I would like to call Resources.GetStringToDisplay("TEXT_0") and get the string "bla bla 0"
    public class Resources {
    public string GetStringToDisplay(String s)
    {          //how can I to return the value of one variable
    return ............;
    public static String TEXT_0="bla bla 0";
    public static String TEXT_1="bla bla 1";
    public static String TEXT_2="bla bla 2";
    public static String TEXT_3="bla bla 3";
    Thanks

    NO you can not get Variable value by camparing string value in J2ME (because J2ME is not supporting reflection package). But you can do one thing to get same functionality.
    public static String TEXT_0="TEXT_0@bla bla 0";
    public static String TEXT_1="TEXT_1@bla bla 1";
    public static String TEXT_2="TEXT_2@bla bla 2";
    public static String TEXT_3="TEXT_3@bla bla 3";
    public string GetStringToDisplay(String s)
    if(TEXT_0.startsWith(s) )
    return TEXT_0.substring (TEXT_0.indexOf('@')+1, TEXT_0.length());
    else if(TEXT_1.startsWith(s) )
    return TEXT_1.substring (TEXT_1.indexOf('@')+1, TEXT_1.length());

  • Possible to get variable name?

    Is it possible to get the name that you have used in your code of a variable?
    ie.
    procedure main_procedure
    is
       l_var varchar2(10) := 'Hello';
    begin
       dbms_output.put_line(get_var_name(l_var));
    end;
    function get_var_name(p_var in varchar2)
    return varchar2
    is
    begin
       -- insert magic here
    end;
    -- End code; Now call the procedure
    exec main_procedure;-- Needed output:
    "variable passed had name l_var and value Hello"

    Hi Sam,
    OK, this is definitely for fun only and NOT recommended for any production database!!
    With that out of the way, this has been adapted from Tom Kyte's who_called_me:
    SQL> create or replace procedure get_var_name (
      2     p_var in varchar2
      3  )
      4  as
      5     call_stack   varchar2(4096) default dbms_utility.format_call_stack;
      6     n            number;
      7     found_stack  boolean default false;
      8     l_line       varchar2(255);
      9     cnt          number := 0;
    10     l_owner      varchar2(255);
    11     l_name       varchar2(255);
    12     lineno       number;
    13     caller_t     varchar2(255);
    14     calling_line varchar2(4000);
    15     var_name     varchar2(1000);
    16  begin
    17     loop
    18        n := instr( call_stack, chr(10) );
    19        exit when ( cnt = 3 or n is null or n = 0 );
    20        l_line := substr( call_stack, 1, n-1 );
    21        call_stack := substr( call_stack, n+1 );
    22        if ( not found_stack ) then
    23           if ( l_line like '%handle%number%name%' ) then
    24              found_stack := true;
    25           end if;
    26        else
    27           cnt := cnt + 1;
    28           -- cnt = 1 is ME
    29           -- cnt = 2 is MY Caller
    30           -- cnt = 3 is Their Caller
    31           if ( cnt = 2 ) then
    32              lineno := to_number(substr( l_line, 13, 6 ));
    33              l_line   := substr( l_line, 21 );
    34              if ( l_line like 'pr%' ) then
    35                 n := length( 'procedure ' );
    36              elsif ( l_line like 'fun%' ) then
    37                 n := length( 'function ' );
    38              elsif ( l_line like 'package body%' ) then
    39                 n := length( 'package body ' );
    40              elsif ( l_line like 'pack%' ) then
    41                 n := length( 'package ' );
    42              elsif ( l_line like 'anonymous%' ) then
    43                 n := length( 'anonymous block ' );
    44              else
    45                 n := null;
    46              end if;
    47              if ( n is not null ) then
    48                 caller_t := ltrim(rtrim(upper(substr( l_line, 1, n-1 ))));
    49              else
    50                 caller_t := 'TRIGGER';
    51              end if;
    52 
    53              l_line := substr( l_line, nvl(n,1) );
    54              n := instr( l_line, '.' );
    55              l_owner := ltrim(rtrim(substr( l_line, 1, n-1 )));
    56              l_name  := ltrim(rtrim(substr( l_line, n+1 )));
    57           end if;
    58        end if;
    59     end loop;
    60     select text
    61     into calling_line
    62     from all_source
    63     where line = lineno
    64     and type = caller_t
    65     and name = l_name
    66     and owner = l_owner;
    67     var_name := trim ( substr (
    68        calling_line
    69        , instr(calling_line, '(') + 1
    70        , instr(calling_line, ')') - instr(calling_line, '(') - 1
    71     ));
    72     dbms_output.put_line('variable passed had name '||var_name||' and value '||p_var);
    73  end;
    74  /
    Procedure created.
    SQL> create or replace procedure main_procedure
      2  is
      3     l_var varchar2(10) := 'Hello';
      4  begin
      5     get_var_name(l_var);
      6  end;
      7  /
    Procedure created.
    SQL> exec main_procedure;
    variable passed had name l_var and value Hello
    PL/SQL procedure successfully completed.cheers,
    Anthony

  • Is it possible to get the value of variable through answers page ?

    Hi all,
    I had Dynamic variable ETLRundate . I want use this variable in Answers page to see the out put ?
    Is it possible to get the value of variable through answers page ?if so how I can use ?

    Hi
    Use the link below and download the documentation
    http://www.oracle.com/technology/documentation/bi_ee.html
    I think you will find what you are looking for in the Answers, Delivers, and Interactive Dashboards User Guide, but in short the syntax to display a variable value is as follows:
    As shown above the syntax for using a presentation variable is:
    @{variablename}{defaultvalue}
    For Session variables use:
    @{biServer.variables['NQ_SESSION.variablename']}
    For repository variables use:
    @{biServer.variables['variablename']}
    Rgds
    Ed

  • Is it possible to get post or Get variables into a flex applicaition without messing with the flashvars?

    Is it possible to get post or Get variables into a flex
    applicaition without messing with the flashvars?

    Probably externalInterface, and maybe BrowserManager.
    But both of those are much harder and messier than flashvars.
    Why are you trying to avoid the easy way?

  • Initialization of global/scope variables ONLY through ASSIGN?

    Is it only possible to initialize global resp. scope variables through an explicit ASSIGN?
    Or can I place e.g. a value="...." attribute inside the BPEL source code at the variable declaration
    to initialize it directly?
    Or even better: can I init the variable through JDeveloper GUI?
    Peter

    I looked this up on Oracle Support and there was one thread that it said that it could be resolved with a 11.1.1.6. to 11.1.1.6.2 patch update.
    We have one test environment on 11.1.1.6.6 to which we have uploaded the RPD to receive the same error, although it now additionally indicated a "Blacklisted Connection Pool". Here are the error details:\
    [2013-01-22T00:30:32.000-08:00] [OracleBIServerComponent] [ERROR:1] [] [] [ecid: 004osJjn__ADCgH_qt0FyY0006Py000000] [tid: e9c8a950] [nQSError: 17014] Could not connect to Oracle database. [[
    [nQSError: 17001] Oracle Error code: 12545, message: ORA-12545: Connect failed because target host or object does not exist
    at OCI call OCIServerAttach.
    [nQSError: 43059] Init block ‘XYZ’: Dynamic refresh of repository scope variables has failed.
    [2013-01-22T00:30:32.000-08:00] [OracleBIServerComponent] [ERROR:1] [] [] [ecid: 004osJjn__ADCgH_qt0FyY0006Py000000] [tid: e9c8a950] [43143] Blacklisted connection pool: 'ABC'
    This is the way I have defined the DSN for the OCI 10g/ 11g within the RPD connection pool:
    (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.53.36.93)(PORT=1541))(ADDRESS=(PROTOCOL=TCP)(HOST=10.53.36.94)(PORT=1541))(ADDRESS=(PROTOCOL=TCP)(HOST=10.53.36.95)(PORT=1541))(ADDRESS=(PROTOCOL=TCP)(HOST=10.53.36.96)(PORT=1541))(LOAD_BALANCE=yes)(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=a.b.c)))
    My next test would be to individually test each host and see which one causes it to error out.
    Any insights of what I could look to additionally do?
    PS: The DBA is yet to get back with the exact version of the Oracle 11g DB but it is greater than 11.1.0.7 since that was the version they were running 6 months back and might have upgraded.

  • Print memory scope variables value

    All,
    How do i print all the memory scope variable and their values that are set via the MB or the taskflow or the UI page using setAction/PropertyListener ?
    I mean where should i write the code ?
    thnks
    Jdev11.1.1.5
    Edited by: in the line of fire on Oct 13, 2011 9:50 AM

    @Frank
    if you can detail this +"If the managed bean uses a HashMap to store values then the bean itself can be used to expose an interface for all of what you want it to do. So its an architecture decision to make (which you should do when designing the application)"+
    As of now what i am doing is
        public void printMemoryVariables(){
            logger.info("inside printMemoryVariables");
            AdfFacesContext adfFacesCtx = AdfFacesContext.getCurrentInstance();
            // get the PageFlowScope Params
            Map<String, Object> scopePageFlowScopeVar= adfFacesCtx.getPageFlowScope();
            // get the requestScope Params
            Map<String, Object> scopeRequestScopeVar= adfFacesCtx.getViewScope();
            Collection scopePageFlowScopeVarValues = scopePageFlowScopeVar.values();
            Collection scopePageFlowScopeVarKeys = scopePageFlowScopeVar.keySet();
            //obtain an Iterator for Collection
            Iterator itrValues = scopePageFlowScopeVarValues.iterator();
            Iterator itrKeys = scopePageFlowScopeVarKeys.iterator();
            //iterate through HashMap values iterator
            while(itrValues.hasNext() && itrKeys.hasNext()){
                logger.info("Key : " + itrKeys.next() +  "Values: " + itrValues.next());
        }And calling this in the initializer of the taskflow. But is it possible to get the values during the task flow execution

  • Is it possible to get view in RULES

    Hi.
    Is it possible to get userView in rules.If any one come across this please post piece of code..
    Thanks in Advance
    Yash

    Try something like this:
    <br><br>
    <set name='user'>
    <rule name='checkoutUserView'>
    <argument name='accountId' value='$(accountId)' />
    </rule>
    </set>
    <br><br>
    <Rule name='checkoutUserView' authType='EndUserRule'>
    <RuleArgument name='accountId' />
    <block>
    <defvar name='viewMaster' />
    <set name='viewMaster'>
    <new class='com.waveset.session.ViewMaster'>
    <invoke name='getLighthouseContext'>
    <ref>WF_CONTEXT</ref>
    <ref>accountId</ref>
    </invoke>
    </new>
    </set>
    <invoke name='setAuthorized'>
    <ref>viewMaster</ref>
    <invoke name='getBoolean' class='java.lang.Boolean'>
    <s>true</s>
    </invoke>
    </invoke>
    <invoke name='checkoutView'>
    <ref>viewMaster</ref>
    <concat>
    <s>User:</s>
    <ref>accountId</ref>
    </concat>
    </invoke>
    </block>
    <MemberObjectGroups>
    <ObjectRef type='ObjectGroup' name='All'/>
    </MemberObjectGroups>
    </Rule>
    <br><br>
    In order to access the user object using dot notation you may need to call this piece of code (not sure if necessary if the variable being used is defined in the task definition):
    <br><br>
    <invoke name='setVariable'>
    <ref>WF_CONTEXT</ref>
    <s>user</s>
    <ref>user</ref>
    </invoke>

  • Is it possible to get the position of a charcter from a string ?

    Hi !
    Is it possible to get the position of a charcter from a string ?
    Example:
    @VAR contains the following text "ABCDEFGHIJKLM"
    I'am seaching for FGH, it start on pos. 6 en ends on pos 8.
    How can I get these numbers 6 and 8 ?
    So, I can use them in the MID(text,start,len) function.
    Thanks!

    Hi Sooraj,
    I'll explain more in detail:
    From a web-service I get a variable called @Spec.
    This variable contains the following:
    "MOTORTYPE[CR]D-QW1234[LF]PART[CR]1234-FRD-X[LF]"
    or
    "MOTORTYPE[CR]ABC[LF]PART[CR]E-435[LF]"
    I need the values behind MOTORTYPE[CR] and behind PART[CR]
    But you’ll see that the positions of these values are different each time.
    If there is a way to get the (start) position of "MOTORTYPE[CR]" or "PART[CR]" and the (end) position of the first "[LF]" behind that,
    then I could use the MID() function to get the correct values.
    The values will be displayed in a table view (between other fields).
    An ABAP-call/function won’t work . . . how should I invoke this within a table column/field object ? (system action ?)

  • Is it possible to get 2-ch signals from TDS2012 oscilloscope at the same time with LabVIEW "7.0"?

    Hi, everyone.
    I've been trying to get the signals from 2-ch of Tektronix TDS2012 oscilloscope at the same time using IVI connection with LabVIEW "7.0"
    I've already searched this developer zone for the answer.
    I've tried the famous example: "IviScope - Acq Dual Wfm Edge Triggered.vi"
    and it gave me the error message like:
    Error -1074110451 occurred at IviScope Initialize With Options.vi
    Possible reason(s):
    Driver Status:  (Hex 0xBFFA600D) Primary Error: (Hex 0xBFFA600D) The Config Server module is not present on the system.
    I think I've installed all~ the required softwares for IVI. For example, ICP 2.2, IVI engine 2.0.46, and tktds1k2k ivi (instrument driver for tds2012, in fact this one is for LabVIEW "7.1"... :-P)
    TDS2012 and my computer is connected through HPIB(GPIB) and it is shown on the MAX (a GPIB instrument as well as an IVI hardware asset)
    I've tried GPIB connection but it gives me asynchronous signals...
    Is it possible to get 2 signals at the same time with LabVIEW 7.0(not 7.1 or higher) by any means?
    What in the earth is the "Config Server" in this case?
    I don't need to sticking to IVI and any method to achieve my goal will be welcome.
    Could anyone give me the hint for this problem, plz?

    I think your problem is that the instrument specific driver is version 7.1 and you are using the class driver with 7.0. You can create your own 7.0 driver by downloading the LabWindows driver and using the Import CVI Instrument Driver under the Tools>Instrumentation menu.
    Since you don't seem to have a good reason to use IVI, why don't you try the native LabVIEW driver at http://sine.ni.com/apps/utf8/niid_web_display.download_page?p_id_guid=E3B19B3E9139659CE034080020E748.... I believe you have all of the functions to setup each channel and then when you trigger the scope, both channels will be captured. You would then transfer each waveform separately. The data is always read sequentially but that's not important as long as both channels are triggered at the same time.

  • How can I get the variable with the value from Thread Run method?

    We want to access a variable from the run method of a Thread externally in a class or in a method. Even though I make the variable as public /public static, I could get the value till the end of the run method only. After that scope of the variable gets lost resulting to null value in the called method/class..
    How can I get the variable with the value?
    This is sample code:
    public class SampleSynchronisation
         public static void main(String df[])
    sampleThread sathr= new sampleThread();
    sathr.start();
    System.out.println("This is the value from the run method "+sathr.x);
    // I should get Inside the run method::: But I get only Inside
    class sampleThread extends Thread
         public String x="Inside";
         public void run()
              x+="the run method";
    NB: if i write the variable in to a file I am able to read it from external method. This I dont want to do

    We want to access a variable from the run method of a
    Thread externally in a class or in a method. I presume you mean a member variable of the thread class and not a local variable inside the run() method.
    Even
    though I make the variable as public /public static, I
    could get the value till the end of the run method
    only. After that scope of the variable gets lost
    resulting to null value in the called method/class..
    I find it easier to implement the Runnable interface rather than extending a thread. This allows your class to extend another class (ie if you extend thread you can't extend something else, but if you implement Runnable you have the ability to inherit from something). Here's how I would write it:
    public class SampleSynchronisation
      public static void main(String[] args)
        SampleSynchronisation app = new SampleSynchronisation();
      public SampleSynchronisation()
        MyRunnable runner = new MyRunnable();
        new Thread(runner).start();
        // yield this thread so other thread gets a chance to start
        Thread.yield();
        System.out.println("runner's X = " + runner.getX());
      class MyRunnable implements Runnable
        String X = null;
        // this method called from the controlling thread
        public synchronized String getX()
          return X;
        public void run()
          System.out.println("Inside MyRunnable");
          X = "MyRunnable's data";
      } // end class MyRunnable
    } // end class SampleSynchronisation>
    public class SampleSynchronisation
    public static void main(String df[])
    sampleThread sathr= new sampleThread();
    sathr.start();
    System.out.println("This is the value from the run
    method "+sathr.x);
    // I should get Inside the run method::: But I get
    only Inside
    class sampleThread extends Thread
    public String x="Inside";
    public void run()
    x+="the run method";
    NB: if i write the variable in to a file I am able to
    read it from external method. This I dont want to do

  • How can I get the variable with the value from Thread's run method

    We want to access a variable from the run method of a Thread externally in a class or in a method. Even though I make the variable as public /public static, I could get the value till the end of the run method only. After that scope of the variable gets lost resulting to null value in the called method/class..
    How can I get the variable with the value?
    This is sample code:
    public class SampleSynchronisation
         public static void main(String df[])
    sampleThread sathr= new sampleThread();
    sathr.start();
    System.out.println("This is the value from the run method "+sathr.x);
    /* I should get:
    Inside the run method
    But I get only:
    Inside*/
    class sampleThread extends Thread
         public String x="Inside";
         public void run()
              x+="the run method";
    NB: if i write the variable in to a file I am able to read it from external method. This I dont want to do

    Your main thread continues to run after the sathr thread is completed, consequently the output is done before the sathr thread has modified the string. You need to make the main thread pause, this will allow sathr time to run to the point where it will modify the string and then you can print it out. Another way would be to lock the object using a synchronized block to stop the main thread accessing the string until the sathr has finished with it.

  • Is it possible to get my fonts and graphics more like Ubuntu.

    Is it possible to get decent graphics in Arch?  I've tried all sorts of things and I never seem to get things the way I want.  At work, I use Ubuntu 11.04 with GNOME fallback and I really like the fonts under the stock setup, but I can't seem to get Arch to do the same.  In fact, I nearly can't stand reading pdf files (something I do a lot of for work) in Arch, because they are rendered so poorly.  It is as if the whites are two white and the blacks too black, and there is a yellow like haze around the fonts.  It is nearly painful to look at for extended periods!  My hardware at home is comparable (if not better) to my hardware at work, so it doesn't make sense for it to be that way.   
    If I've got an ATI Radeon HD 4670 card, should I use the proprietary driver or generic driver? Or, does it not even matter? 
    I've installed and messed with the infinality font patches, but I can't seem to get anything good with them either.  (I posted about font problems a while back, but I've upgraded a lot of hardware since then.) I've looked at the ubuntu font packages, but everything I see states that they are outdated. 
    I like Arch, because it is light and snappy compared to Ubuntu, so I don't want to switch OS'es.

    I took a quick look at the Ubuntu packages for evince and poppler, and couldn't see an obvious reason for improvement over stock.
    Poppler's font rendering is known to be bad (and difficult to fix).
    The quality of individual monitors is one of many variables that can make a huge difference to the perceived quality of fonts.
    The radeon vs ATI proprietary driver shouldn't make any difference, unless the open-source driver is royally broken, and I can't recall anyone else calling such brokenness plausible - it would be blatantly obvious to every user of it, surely.

  • Possible to get JComboBox before and after chaged value?

    Hi,
    I have a JComboBox... whenever the JComboBox value change is it possible to get the before and after changed value? For example:
    Let says the JComboBox is showing "One" and the user change it to "Three" after the user chged... I want to System.out.println before chged value ("One") and aft chged value ("Three")
    I tried:
    put in some code in the itemStateChanged() method... but no success...
    Can someone pls provide some pointer or sample code...
    Thank you for your time...

    Ok, I lost half a day on this (novice problem), but I arranjed a solution that resolve the problem totally. There is the code:
    YourComboBox.addFocusListener(new java.awt.event.FocusAdapter()
            int aux_selected;
            // if YourComboBox gains Focus
           public void focusGained(java.awt.event.FocusEvent fe)
                // get index value of selected element
               aux_selected= YourComboBox.getSelectedIndex();
               // create a variable for storing de ItemListener
              ComboBListener = new java.awt.event.ItemListener() {
                   public void itemStateChanged(java.awt.event.ItemEvent e)
                       if(e.getStateChange()==java.awt.event.ItemEvent.SELECTED)
                           // compares the selected value with the old one
                           if (aux_selected!=YourComboBox.getSelectedIndex())
                           System.out.println("ComboBox Changed !");
               // add the variable Listener to your Combo
               YourComboBox.addItemListener(ComboBListener);
           // if focus is lost
           public void focusLost(java.awt.event.FocusEvent fe)
              // remove the itemListener from the combobox
             YourComboBox.removeItemListener(ComboBListener);
    //Put the Listener variable outside
    private java.awt.event.ItemListener ComboBListener; //----------------------------------------------------------------------------------------------------
    You only have to change YourComboBox by the name of the combobox.
    To all people that help this forum (specially from PORTUGAL) and all java people: YOU ARE DOING A GREAT JOB

  • Is it possible to create a variable...

    We're working in FM8, is it possible to create a variable (just like you would with a modification date, time) that has the modifier's name or initials? For a specific project, I want to be able to track who's working on which section(s) that way I can hold that person accountable for that particular document.

    ... is it possible to create a variable (just like you would with a  modification date, time) ...
    The examples you give are System Variables, so I'm presuming you want the system to supply this info, and all that it may have is the user's login ID, which may or may not have anything to do with their initials or name. And even this presumes that later versions of Frame can pick this up, which I doubt. I don't see any new constructs for SysVars in FM9 that would be helpful.
    And it would have to be the UID of who opened the file, because who owns the file is often the original file creator, regardless of later updates (and it might even be who created the template file).
    ... that has the modifier's name or initials?
    You can of course create an ordinary User Variable, but then you need to get the writers to set it, or overlay a script that forces it.

Maybe you are looking for

  • Error after close popup with swfloader

    Hi all, hope some one could help me with this i get this error ( Error: Unable to load '' ) each time after i close a popup with a swfloader the error popsup when i click on the datagrid *****************************main mxml private function ShowPan

  • How to insert check box in pages?

    This may be a dumb question, but how to insert  check box in Pages?  Thanks

  • Error of Specify Chart-of-Dep.-Dependent Screen Layout/Acct Assignment

    HI My previous asset error was cleared by assigning non-tax  While  using the option of Specify Chart-of-Dep.-Dependent Screen Layout/Acct Assignment the following error is coming ..... Steps are attached (File and URL) http://rapidshare.com/files/13

  • Installation of 8.1.6 on solaris 8

    Hi all, Has any one tried installing Oracle 8.1.6 on solaris 8. The installation guide says it is supported only by 2.6 and solaris 7. Any help would be appreciated. Thanks

  • Javascript is not working in the published file

    Hi , I using the javascript in the captivate 5.5 to generate the text from variable in the textbox. It is working when I press the F12 button, But it is not working in the Published file. I called the function in the button and I written the script i