Coding Practice(GV$SESSION)

Hi
Recently there was an issue of 1 procedure running in parallel through 2 different sessions and causing some irregular results.
So, I changed the code in such a way that when the procedure runs then it sets the module and action in the GV$SESSION view.
exec DBMS_APPLICATION_INFO.SET_MODULE ('MOD', 'ACT3000');
So whenever the procedure runs it first checks in GV$SESSION whether ACTION with the name ACT3000 is running or not, if not it runs,else it exits.
The question I have here is that is it a bad coding practice to select from the view GV$SESSION or any other system views in a procedure or an anonymous block?
Regards
Ankit

The question I have here is that is it a bad coding practice to select from the view GV$SESSION or any other system views in a procedure or an anonymous block?Probably there's no general answer to this. Sometimes it is just necessary to to query system views, sometimes you might think it over again - in particular for performace reasons.
In your case you also have the alternative of querying sys_context to get the information you wanted:
SQL> select sys_context('userenv','module') module, sys_context('userenv','action') action from dual;
MODULE                         ACTION
SQL*Plus
SQL>..whereby dual itself is a system view/table ;)

Similar Messages

  • How to follow best coding practices and make this code runable.

    How to change this code to make it work and follow best coding practices.
    This code is to add fields to internal table LIST which already exist.
    In the loop are all the selections which are to be made.
    But i am new to ABAP and not sure how to make this work.
    please help me.
    DATA: wa_list LIKE LINE OF list,
          l_v_index TYPE i.
    DATA: t_price_result1 TYPE STANDARD TABLE OF komv WITH HEADER LINE INITIAL SIZE 0.
    DATA: wa_result LIKE LINE OF t_price_result1.
    LOOP AT list INTO wa_list.
      l_v_index = sy-tabix.
    *GET MATERIAL DOCUMENT(MBLNR) AND DELIVERY NUMBER(XBLNR)
      SELECT  mkpf~mblnr
              mkpf~xblnr
       into (wa_list-mblnr, wa_list-xblnr )
    *            INTO i_list
       from mkpf inner join mseg
    *   up to 1 rows
        on mkpf~mandt = mseg~mandt
        and mkpf~mblnr = mseg~mblnr
        and mkpf~mjahr = mseg~mjahr
        where mseg~matnr = wa_list-matnr
         and mseg~charg = wa_list-charg
         and mseg~kunnr = wa_list-kunnr
         and mseg~sobkz = wa_list-sobkz
         and mseg~werks = wa_list-werks
         and mkpf~budat in budat.
                                                                "RFC3762
      ENDSELECT.
      wa_list-mblnr = list-mblnr.
      wa_list-xblnr = list-xblnr.
    * GET POSNR FROM TABLE LIPS
      SELECT posnr
      FROM lips
      INTO list-posnr
      up to 1 rows
      WHERE vbeln = wa_list-xblnr AND
                 matnr = wa_list-matnr.
      ENDSELECT.
      wa_list-posnr = list-posnr.
    * GET SALES ORDER #
      SELECT vbelv
      FROM vbfa
      INTO list-vbelv
      up to 1 rows
    *        INTO wa_list
      WHERE vbeln =  wa_list-xblnr.
      ENDSELECT.
      wa_list-vbelv = list-vbelv.
    *GET PO
      SELECT bstkd
      FROM vbkd
      INTO list-bstkd
      up to 1 rows
      WHERE vbeln =  wa_list-vbelv
          AND posnr = 0.
      ENDSELECT.
      wa_list-bstkd = list-bstkd.
    *get serial number
      SELECT SINGLE obknr
       FROM ser01
       INTO list-obknr
       WHERE lief_nr = wa_list-xblnr
           AND posnr = wa_list-posnr.
    wa_list-obknr = list-obknr.
    SELECT sernr
    FROM objk
    INTO list-sernr
    up to 1 rows
    WHERE obknr = wa_list-obknr.
    ENDSELECT.
    wa_list-sernr = wa_list-sernr.
    *get date
    SELECT budat FROM mkpf
    INTO list-budat
    up to 1 rows
    where mblnr = wa_list-mblnr.
    ENDSELECT.
    wa_list-budat = list-budat.
    *get CLP
    SELECT   vkorg vtweg spart
    INTO (list-vkorg, list-vtweg, list-spart)
    up to 1 rows
    FROM vbak WHERE vbeln = wa_list-vbelv.
    ENDSELECT.
    wa_list-vkorg = list-vkorg.
    wa_list-vtweg = list-vtweg.
    wa_list-spart = list-spart.
    SELECT pstyv
    INTO list-pstyv
    FROM  vbap
    up to 1 rows
    WHERE vbeln = wa_list-vbelv AND posnr = wa_list-posnr.
    ENDSELECT.
    wa_list-pstyv = list-pstyv.
    CALL FUNCTION 'Z_SD_PRICING_CONDITION'
    EXPORTING
    i_organization                  = wa_list-vkorg
    i_dist_channel                  = wa_list-vtweg
    i_division                      = wa_list-spart
    i_customer                      = wa_list-kunnr
    i_plant                         = wa_list-werks
    *      i_pricng_date                   = sy-datum
    i_material                      = wa_list-matnr
    *   I_SALES_UNIT                    = 'EA'
    *   I_QUANTITY                      = '1.000'
    i_stor_loc                      = '0001'
    i_item_cat                      = 'TAN'
    *   I_AUART                         =
    *   I_REFRESH                       = 'X'
    *   I_KOMP                          =
    *   I_KOMK                          =
    * IMPORTING
    *   E_MES_TYPE                      =
    *   E_MES_NUMBER
    *   E_MESSAGE                       =
    TABLES
    t_price_result                  = t_price_result1
    * EXCEPTIONS
    *   CUSTOMER_NOT_FOUND              = 1
    *   PLANT_NOT_FOUND                 = 2
    *   MATERIAL_NOT_FOUND              = 3
    **   PLANT_MATERIAL_NOT_FOUND       = 4
    *   SALES_DATA_NOT_FOUND            = 5
    *   ORG_UNIT_NOT_FOUND              = 6
    *   UNABLE_TO_CALCULATE_PRICE       = 7
    *   UNABLE_TO_FORMAT_PRICE          = 8
    *   MANDATORY_INFOR_MISSING         = 9
    *   OTHERS                          = 10
    LOOP AT t_price_result1.
      IF  t_price_result1-kschl = 'ZPR2'.
        wa_list-kbetr = t_price_result1-kbetr.
      ELSE.
        wa_list-kbetr = 0.
      ENDIF.
    ENDLOOP.
    MODIFY list FROM wa_list INDEX l_v_index.
    ENDLOOP.

    Hi,
    Lets first start from your Select Statement.....Replace your SELECT ....ENDSELECT by SELECT Into Internal Table
    Your program is having a SELECT...ENDSELECT within LOOP...ENDLOOP........One should avoid doing this as far as possible.
    SELECT  mkpf~mblnr
                  mkpf~xblnr
    INTO itab
    for all entires i_list
    from    mkpf inner join mseg
        on   mkpfmandt = msegmandt
        and mkpfmblnr = msegmblnr
        and mkpfmjahr = msegmjahr
        where mseg~matnr = i_list-matnr
           and mseg~charg = i_list-charg
           and mseg~kunnr = i_list-kunnr
           and mseg~sobkz = i_list-sobkz
           and mseg~werks = i_list-werks
           and mkpf~budat in budat.
    Restructure youe complete code with this approach and Share your Finding's.
    You can also think of using a SAP Standard FM.
    Anyway..What is the objective/Output of this report?

  • Coding Practice for Bound Property Names

    I think this simply an issue over coding practices, but if I am right then all the tutorials and documentation on how to write Beans are promoting poor coding practices. Speicifcally, it bugs me that String literals are always used in all the code I see. As in the following code:
    class MyBean  {
       public void setValue(value newValue) {
          beansupport.firePropertyChange("value", oldValue,  value);
    }the practice that I have starting using is:
    class MyBean  {
        public static final String propertyValue = "value";
       public void setValue(value newValue) {
          beansupport.firePropertyChange(propertyValue, oldValue,  value);
    }This way, a PropertyChangeListener can refererence MyBean.propertyValue instead of using the literal "value" -- eliminating the chance for error and also there don't have to be multiple literals floating around using up space. Is there any reason this isn't commonly accepted practice or did I miss something?

    Strings appearing in source code can be reduced to a constant, like an enum. So it is likely that the code with strings is actually faster, as the value is known before compilation. It is easier to read. Keep in mind that strings get interned every now and then and thus get reduced to this equivalency:
    public method blah( "value", some stuff )...
    public method nah(*){ do stuff; let x = "value"; more stuff with "zoiks!" }
    ends up like
    key k1 = "value"
    key k2 = "zoiks!"
    what the jvm sees;
    public method blah( key1, some stuff )...
    public method nah(*){ do stuff; let x = key1; more stuff with key2 }
    The string values get "inlined" and can be checked during compilation, allowing for many optimisations not otherwise possible.
    Hope that helps a little.
    Andrew

  • Best Coding Practices

    Hi
    are there any best coding practices for EP development?can anybody suggest the material?
    Prasad

    EP, as in Enterprise Portal?
    James

  • Connect JavaFx(Applets) to J2EE - best practice & browser session

    Hi there,
    I’m new to JavaFX and Applet programming but highly interested.
    What I don’t get at the moment is how you connect the locally executed code of the applet to your system running on a server (J2EE).
    Of course there seem to be different ways but I would like to avoid using RMI or things like that because of the problem with firewalls and proxies.
    So I would like to prefer using HTTP(s) connection.
    And here my questions:
    1.) Is there any best practice around? For example: using HTTP because of the problems I mentioned above. Sample code for offering java method via HTTP?
    2.) Is there a possibility to use the browser session? My J2EE applications are normally secured. If the user opens pages he has to login first and has than a valid session.
    Can I use the applet in one of those pages and use the browser environment to connect? I don’t want the user to input his credentials on every applet I provide. I would like to use the existing session.
    Thanks in advance
    Tom

    1) Yes. If you look at least at the numerous JavaFX official samples, you will find a number of them using HttpRequest to get data from various servers (Flickr, Amazon, Yahoo!, etc.). Actually, using HTTP quite insulates you from the kind of server: it doesn't matter if it run servlets or other Java EE stuff, PHP, Python or other. The applet only knows the HTTP API (GET and POST methods, perhaps some other REST stuff).
    2) It is too long since I last did Java EE (was still J2EE...), so I can't help much, perhaps somebody will shed more light on the topic. If the Web page can use JavaScript to access this browser session, it can provide this information to the JavaFX applet (JS <-> JavaFX communication works as well as with Java applets).

  • Best coding practice

    Not a big deal here but I'm curious what others think about
    this. A fellow programmer and I were talking about this and
    couldn't come to a conclusion.
    Basically is it better to use a NOT EQUAL TO or an EQUAL TO?
    For instance if you have a list of names and you want all
    "BOB"s to be treated one way and all others to be treated another.
    Would it be better to say
    <cfif FNAME EQ "BOB">
    blah blah
    <cfelse>
    woo woo
    </cfif>
    or
    <cfif FNAME neq "BOB">
    woo woo
    <cfelse>
    blah blah
    </cfif>

    quote:
    Originally posted by:
    MaryJo
    quote:
    Originally posted by:
    MikerRoo
    Good grief, you are ALL wrong --
    especially Mary Jo for introducing a barely relevant tangent
    to the thread and getting it wrong to boot!
    First of all, when someone asks what is best for a string
    comparison, mentioning Compare and CompareNoCase is *hardly*
    irrelevant. Second, I was NOT wrong. Since the discussion was
    revolving around performance that was just what I mentioned. That
    doesn't make me
    wrong just because there are reasons to use it other than
    just that. If you want to debate if there's any performance gains,
    well that comes right out of the CFMX coding guidelines at
    Livedocs, which say it is "significantly faster". I'm assuming Sean
    is correct in stating this, I'm not really in the mood to test it
    myself, but feel free to add your comments there and tell him he's
    wrong if you disagree.
    http://livedocs.macromedia.com/wtg/public/coding_standards/performance.html
    Of course, you can debate if the gain is that big a
    deal...which is why I phrased it the way I did (i.e. "If it's
    processing time you care about....") Again, that's what the bulk of
    the debate was on, so that was what I was addressing.
    No one asked what was the best for string comparison. YOU
    raised that issue.
    Your stated reason, (for performance) has not been true since
    CF5.
    Up until then, the question seems to be as much about style
    as anything else.
    That page you linked says that
    CompareNoCase() is "faster" than "is not".
    (1) If you actually run the tests, you'll see that the
    difference is less than the test variation (but statistically
    real).
    (2) This says nothing about compare() vs "IS". Here the
    performance is the same.
    (3) CompareNoCase is not functionally the same as the most
    commonly needed string comparison (case tolerant), so that is
    irrelevant for most uses anyway.
    Run the tests yourself and see that I'm right.
    In fact,
    Sean even admits, that the real reason to use compare() is
    accuracy, at the bottom of that page!
    So, my assessment was right. You were right mostly for the
    wrong reason and the post was barely relevant.
    Ironically, if you had found and linked that page to begin
    with, it would have made one more case for avoiding negative logic
    ("IS NOT").

  • Any usefull examples of good coding practice in large programs

    Hi, ive been writing code for about 10 years now. Know a good bit about labview now lmao! But want to get to know good code practices e.g. in creating large programs, code templates, avoiding race conditions, use of multiple loops and to be able to write code for clients as a contractor. Any one help me??
    Stu
    Solved!
    Go to Solution.

    Check out thelargeapp community and this KB article
    Message Edited by Jeff Bohrer on 06-14-2010 04:49 PM
    Jeff

  • SAP ABAP secure coding related training session

    Hi Experts,
    Do you know of any training or code jams provided by SAP for organizations related to SAP ABAP secure coding?

    Thanks Alex for your reply.
    The course and goals look perfect.
    But I was looking for something that could be arranged in my company's Mumbai(India) office.
    Can anyone help me with any classroom/virtual training or Code Jams related to secure ABAP programming.

  • Good coding practice for object init

    We have a code that requires initializing instance of the object for each item in the loop. I have following option in mind. Please advice which one is the best option. TIA
    Option 1
    =======
    public class AThread extends Thread {
    private ObjectA var1 = null;
    private ObjectA var2 = null;
    public AThread() {
    this.var1 = new objectA();
    public void run() {
    while ( ... ) {
    if (var2 != null) {
    var2 = null;
    var2 = var1;
    var2.callmethod();
    Option 1
    =======
    public class AThread extends Thread {
    private ObjectA var1 = null;
    public AThread() {
    public void run() {
    while ( ... ) {
    var1 = new objectA();
    var1.callmethod();
    var1 = null;
    }

    1. If in the future, you post code, you can make it much more readable by enclosing it in the [code][/code] tags.
    2. Why not implement Runnable instead of extend Thread? You're not creating a new type of thread, so it is more "OO"-sensible to create a new Runnable and run it.
    3. In the first Option 1, you might as well just be doing
    while (...) {
      var1.callMethod();
    }Assigning the reference to another variable does not create a new instance of the object, so it is not worthwhile to create a new reference to it just to call its methods.
    4. In option 2, setting the object's reference to null at the end doesn't really help anything, because the object is going out of scope anyway and will be destroyed.
    Your question, really, between the two options, is as follows: should you recreate and destroy the object for every iteration through the loop, or just call the method multiple times?

  • Good Coding practice

    Example of a nonsense code below
    for (int i=0; i < 10; i++)
        int total = i + 1;
    System.out.println(total);when excute, total will be redeclared 9 times, compiler doesn't complain. But is this clean?
    A better code below?
    int total;
    for (int i=0; i < 10; i++)
        total = i + 1;
    }

    My query is whether the "buffer" inside the loop ok?It's fine where it is. The compiler calculates how many slots on a stack
    are needed for all local variables. Those slots are allocated from the
    stack upon entry of the method and removed when the method returns.
    Note that the amount of slots needed is not necessarily the same as
    the total number of local variables:void foo() {
       int i; //  slot 1
       for (int j= 0; j < 10; j++) // slot 2
       for (int k= 0; k < 10; k++) // slot 2 again
    }kind regards,
    Jos

  • Cipher coding practice...

    I have a teaser cipher That I have mad via applescript.
    I'm curious to know if I can, and if so, how I can only include the alphabet.
    Josh

    I'm curious to know if I can, and if so, how I can only include the alphabet
    What do you mean by this?
    Do you mean you want to validate the input to make sure it's only valid alphabetic characters?
    Or you want to validate the output to make sure it's valid alphabetic characters?
    Without more details it's hard to give you an optimal design, but in general, given a string s you can validate that it matches a character set via something simple like:
    -- here's your string to check:
    set inputStr to "the quick brown fox jumped over the lazy dog"
    -- go check it:
    set isValid to checkAlpha(inputStr)
    on checkAlpha(s)
      set validChars to {" ", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", ¬
      "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"}
      repeat with eachChar in (characters of s)
      log eachChar as string
      if eachChar as text is not in validChars then return false
      end repeat
      -- if we get here, every character matched, so we're good to go
      return true
    end checkAlpha
    In this model, just expand the validChars list to include all the characters you consider valid.
    There are also numerous other ways of doing this. I'm sure other people will add their $0.02, too.

  • Problem while invoking a Stateless Session bean from another bean

    Hi,
    I have a peculiar problem while coding with Stateless Session beans. Maybe you guys can help me out over here. The scenario is as follows
    There are 3 Stateless Session beans. Let Us say Bean A, B and C. There are three methods, method1, method2, and method3 inside A, B and C respectively.
    From A.method1(), B.method2(), and C.method3() are being invoked sequentially. Each of these methods does some JDBC operation and then returns.
    The problem is this, if C.method3() throws and exception, then I am unable to rollback the changes made by B.method2(). Those changes get "Committed" to the database.
    All the 3 beans have Bean managed persistence property set. I am using WebSphere 6.1.
    Any insight on why this is happening would be greatly appreciated.
    Thanks In Advance
    Amardeep Verma

    Hi,
    This is a matter of calling all three methods in the same transaction context. Most easy way of doing this is having a 4th session bean containing a method calling the other 3. Make sure that the Transaction Attributes are REQUIRED, which is the default.
    If the calls a to different backends/databases, you need global transactions and therefor XA complient database and drivers.
    HTH Robert

  • Best Practice EJB 3.0 Question

    I have a web application consisting of 3 projects:
    - Model (EJB 3.0 Session Beans connected to two different databases)
    - TagLibrary (custom tag library)
    - ViewController (Web App / GUI)
    Currently I am connecting to the EJB Beans using code that Jdeveloper generates for a test client:
    env.put( Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory" );
    env.put(Context.PROVIDER_URL, "t3://localhost:7101");
    However would like to move these to a properties file (I believe jndi.properties) such that they can be modified based on app server.
    My question is following:
    What is best practice for Session beans in the Model project to access other session beans in the same project? Do I also need to specify JNDI prop file and settings? (This occurs when Bean from one database needs to access bean from another database).
    Or should I really put these in two separate projects / EJB libraries?
    Thanks,
    Kris

    You have two options, first is to use JNDI lookup (you should be able to use just new InitialContext(), without the environment map).
    Second one is more elegant and, as far as I'm concerned, should be referred to as best practice, that is using dependency injection:
    @EJB
    YourSesionBeanInterface yourEJB;
    If you get stuck, there is plenty of documentation about this on the internet.
    Pedja

  • Good programming practice

    There are 2 sets of code which I extracted from a dummy book. The author just want to illustrate 2 ways that we can capture an exception.
    Code set 1_
    import static java.lang.System.out;
    class GoodNightsSleepA {
        public static void main(String args[]) {
            out.print("Excuse me while I nap ");
            out.println("for just five seconds...");
            takeANap();
            out.println("Ah, that was refreshing.");
        static void takeANap() {
            try {
                Thread.sleep(5000);
            } catch (InterruptedException e) {
                out.println("Hey, who woke me up?");
    Code set 2_
    import static java.lang.System.out;
    class GoodNightsSleepB {
        public static void main(String args[]) {
            out.print("Excuse me while I nap ");
            out.println("for just five seconds...");
            try {
                takeANap();
            } catch (InterruptedException e) {
                out.println("Hey, who woke me up?");
            out.println("Ah, that was refreshing.");
        static void takeANap() throws InterruptedException {
            Thread.sleep(5000);
    }To u guys who are experienced java programmer out there. Which set of code do u think is better coding practice and u'll usually code that way ? I personally would say GoodNightsSleepA is a better practice. Or u guy have some other better suggestion ? Thank you.

    Thank you to everybody who responded to this thread. Can anyone pls point me to a link that talks about proper OOP system analysis and design. I believe I need some foundation on this, otherwise I can't write a proper scalable code. Like some of u has pointed that the GoodNightsSleepB class will be more appropriate coz it provides flexibility to other user who would like to use it as a subclass. I didn't thought of this b4 until u guys have enlighten me.
    To corlettk, I'm totally new to AOP. I just read some of the links from the google search result. I'm still in a very blur stage about AOP. Am I right to assume that we should only code to include basic business requirement functions(primary task) in our class and make use of AOP to do the secondary task(such as data verification/exception capturing) ? Pls correct me if I'm wrong. Thank you in advance, guys.

  • Transfer object,  FindByPrimaryKey, session facade

    I would like to request help on coding a 'facade session' bean that invokes the FindByPrimaryKey method on a BMP entity bean, and how to put the returned values into a transfer object. I've been trying to modify the code provided in Sun's 'Duke's Bank Application' to accomplish this. Below is the code copied and pasted from Sun's session facade. 'accountIds' is a Collection that contains the values (customerId, balance, etc) of bank accounts which were retrieved with a FindBy method. AccountDetails produces a transfer object.
    try {
    Iterator i = accountIds.iterator();
    while (i.hasNext()) {
    Account account = (Account)i.next();
    AccountDetails accountDetails = account.getDetails();
    accountList.add(accountDetails);
    I was wondering how to accomplish the task of transfering values into a transfer object when invoking FindByPrimaryKey.
    I've taken a few stabs at it. My FindByPrimaryKey method doesn't throw any exceptions (as far as I can tell):
    try {
    Account account = accountHome.findByPrimaryKey(id);
    } catch (Exception ex) {
    throw new AccountNotFoundException("darn it - " + ex.getMessage());
    The error (which appears in the catalina log) occurs in the following section of code, which immediately follows the above:
    ArrayList myAccountDetails = new ArrayList();
    try {
    AccountDetails accountDetails = account.getDetails();
    myAccountDetails.add(accountDetails);
    } catch (RemoteException ex) {
    throw new EJBException("getDetails isn't working in AccountControllerBean: " + ex.getMessage());
    And here is the business method from Account:
    public AccountDetails getDetails() {
    return new AccountDetails(id, surname, firstname, balance);
    If any of the experts out there have spotted a mistake, I sure would be grateful for your help.
    James

    Thank you for your help. I think the ejbCreate method in the 'session facade' takes into account your advice:
    public void ejbCreate() {
    try {
    accountHome = EJBGetter.getAccountHome();
    } catch (Exception ex) {
    throw new EJBException("ejbCreate: " +
    ex.getMessage());
    account = null;
    accountId = null;
    I included your piece of code just the same to see if it would help anyway. Unfortunately the same error appeared in the catalina file.
    Also, there were error messages I hadn't noticed until now in the Verifier.
    One read:
    "No findByPrimaryKey method was found in home interface class [database.AccountHome]"
    The other:
    "No single argument findByPrimaryKey was found in home interface class [database.AccountHome]"
    Here is the method in the implementation class of the entity bean:
    public String ejbFindByPrimaryKey(String primaryKey)
    throws FinderException {
    boolean result;
    try {
    result = selectById(primaryKey);
    } catch (Exception ex) {
    throw new EJBException("ejbFindByPrimaryKey: " +
    ex.getMessage());
    if (result) {
    return primaryKey;
    else {
    throw new ObjectNotFoundException
    ("Row for id " + id + " not found.");
    Below is the 'selectById' method that it invokes:
    private boolean selectById(String primaryKey)
    throws SQLException {
    makeConnection();
    String selectStatement =
    "select id " +
    "from accountTable where id = ? ";
    PreparedStatement prepStmt =
    con.prepareStatement(selectStatement);
    prepStmt.setString(1, primaryKey);
    ResultSet rs = prepStmt.executeQuery();
    boolean result = rs.next();
    prepStmt.close();
    releaseConnection();
    return result;
    Here is what I have in the home interface of the entity bean for this find method:
    public Account findByPrimaryKey(String id)
    throws FinderException, RemoteException;
    In addition here is the entire method in the 'session facade':
    public ArrayList getAccount(String id)
    throws AccountNotFoundException, InvalidParameterException {
    if (id == null)
    throw new InvalidParameterException("null id");
    try {
    account = accountHome.findByPrimaryKey(id);
    } catch (Exception ex) {
    throw new AccountNotFoundException("dag it" + ex.getMessage());
    ArrayList accountList = new ArrayList();
    try {
    AccountDetails accountDetails = account.getDetails();
    accountList.add(accountDetails);
    } catch (RemoteException ex) {
    throw new EJBException("getDetails isn't working in Account ControllerBean: " + ex.getMessage());
    return accountList;
    Thanks again for helping me out.
    James

Maybe you are looking for

  • Not getting updating in a table....

    Hi friends, Currently i working on integration of apex with ebs R12.....And i have successfully integrated following the rod west document.... I created one DB application in my sample schema that is associated with apex 4.0..... Application details:

  • Obtaining a collection as a return from an execute immediate pl/sql block

    version 10.2 I need to obtain the collection back from the execute immediate of a pl/sql block: procedure block(owner varchar2) is stmt                   long; objecttab_coll         dbms_stats.objecttab; begin stmt := '    begin     dbms_stats.gathe

  • Secret for using Cross Dissolve transitions

    Based on my limited experience, the most useful transition is the cross dissolve. It is pretty much the only one I use since it is doesn't draw attention to itself and bears repeated deployment for smooth scene changes. But it has a problem: If you s

  • LED Cinema Display issues with audio and App Switching

    The audio on my Cinema Display fails after about 20 minutes, unable to diagnose other than Mavericks. When swithing between apps (seems like Safari more than anything else) I experience a 5 second freeze every 4th or 5th switch using external Apple K

  • Database Queries/Filters Using APEX Maps

    Hi All, I'm a new programmer to Oracle APEX, and would love some help!! I am constructing a database that has information about laboratories around the world that test for a certain type of disease. I've built a page in my application, and within tha