How to find out where my code is running

Our software can run in EJB or Web Container. Based on its environment it does things differently, For example connection pooling, Transaction Management, etc. Problem is that I cannot figure out a way to make my software smart enough to find out where it is running. Its caller has to pass it a parameter telling it where it is running. I don't like it at all. Can someone please help me to understand what I can do give this functionality to my software i.e to figure out by itself if it is running in WEB container or EJB Container.

Is there maybe a tell-taling class in one onvironment, which is not there in the other one?
try {
Class.forName("tell.taling.one";
//okay
catch (Exception e) {
//oops - not found
}

Similar Messages

  • How to find out where R/3 report data are stored

    Hy,
    I am new in BW.
    I have SAP R/3 report, I need to transfer that report data (all table data) to BW.
    Could You explain me step by step how i can do it?
    How to find out where data are stored?
    Thank you very much!
    Regards,
    Arunas

    Hi Arunas,
    This topic has been discusssed here earlier. Check these links:
    BW solution for ABAP Reports
    BW reports
    Bye
    Dinesh

  • How to  find out where sap error messages stored...

    How to  find out where sap error messages stored in our system.like sometime we will get a error message with message number.whr it will be stored and whch table it is?

    Hi,
    I also got the same message when that message no is not there
    E:SABAPDOCU:000 test 
    yours is S-type and message id ZY and message no 127
    127 is not there either change the no  or create the same
    Regards
    Shiva

  • How to find out where sap error messages stored in our system

    How to find out where sap error messages stored in our system.like sometime we will get a error message with message number.whr it will be stored and whch table it is?

    Are you interested in WDA messages ?
    The set a breakpoint in METHODS IN class CL_WDR_MESSAGE_MANAGER.
    Then use call stack (default desktop 2 in debugger) to see where message is added to message manager.
    regards
    phil

  • How to find out where the tablespace physical file *.dbf ?

    How to find out where is my tablespace physical file *.dbf ?
    Can I increase tablespace_name: TEMP and how to increase it.
    First, I need to know where is the TMP *.pdf file, am I right?
    Thanks in advance

    This forum is for issues with the SQL Developer tool. You'd get more response in the General Database forum.
    Have fun,
    K.

  • How to find out Last T-Codes by a Users in Last 24 Hurs?

    Dear experts
    how to find out Last T-Codes by a Users in Last 24 Hurs?
    Please Help
    Regrads
    Is STAD is only solution (or) any other easy way?
    Regards
    PR

    Hi,
    Maybe it's easier with this path :
    ST03N --> Expert Mode --> Day  --> choose your day
    Under analysis view double click on "Memory Use Statistics"
    You will get the list of transactions run that day.
    If you double click on a transaction you will get the list of users who used this transaction.
    If you select the User view, when you double click on a user, you will get the list of transctions this user launched this day.
    Many ways to use this ST03N transaction...
    Regards,
    Olivier

  • How to find out your PUK code

    How to find out your PUK code for a iPhone 5c

    Ask your Carrier who gave you the SIM.

  • How to find out where used list of Table or T-code

    Dear ABAP gurus
    I know many of you have done this several times.
    wish to find out which Transaction code INSERTs the data into the table IHPA.
    I did the where  used list - SE11 ( for specific key work called INSERT ).
    Used the Table called D010TAB which has some information.
    Vise versa if I know a T-CODE , how to know which tables it read  & Modify...
    any better procedure than spending hours in research...
    I found similar custom program to find USER EXITS ...here..., looking soething similar...
    [http://wiki.sdn.sap.com/wiki/display/Snippets/FindUser-exits%2CBADIs%2CBTEs%2CEtcbyTCodeorProgram]
    thank you for your help
    Edited by: Raj Anvesh on Aug 3, 2011 9:58 PM

    Hi Anvesh,
    Maybe the data INSERTION is happening by BAPI,
    So just try to look for the concerned BAPIS.
    ECP_SRV_PARTNERS_IHPA
    IREP1_IHPA_ADRNR_PRE_FETCH
    IREP1_IHPA_ADRNR_READ
    MAP2E_DIIHPA_TO_PARTNER
    MAP2E_IHPAVB_BAPI2080_NOTPARTE
    MAP2E_IHPAVB_TO_BAPI_IHPA
    MAP2E_IHPA_BAPI2080_NOTPARTNRI
    MAP2E_IHPA_M_BAPI2080_NOTPNRI
    MAP2I_BAPI2080_NOTPARTNRI_IHPA
    MAP2I_BAPI_IHPA_TO_IHPA
    PM_DB_FILL_DIIHPA
    PM_PARTNERCOPY_FILL_XIHPA
    PM_PARTNER_DELETE_XIHPA
    PM_PARTNER_GET_XIHPA
    PM_PARTNER_PUT_XIHPA
    PM_PARTNER_REFRESH_XIHPA
    these are the bapis which are dealing with the IHPA table,
    Segregate them as needed and then go to the std program
    Revert for further clarification.
    Thanks
    Sri

  • How to find out where an alias is defined

    How can I find out where an alias is defined on my system? I am referring to the kind of alias that is used within a Terminal session launched from Mac OS X (10.6.3).
    For example, if I enter the alias command with no parameters at a Terminal command prompt, I get a list of aliases that I have set, for example, this is one of them
    alias mysql='/usr/local/mysql/bin/mysql'
    However, I have searched all over my system using Spotlight and mdfind in various startup files and so far can not find where this alias has been defined ( I did it a long time ago and didn't write down where I assigned the alias).

    Thank you. I must have missed that before. It looks like the alias definitions in my case are in the file ~/.bash_profile.

  • How to find out where a value is stored

    Hi,
    i entered something in HR Area infotyp 0031, i expected to find those entries in table pa0031, but this table remains empty. How can i find out where sap stores those values?

    press F1 on the field where u typed the value. click on technical info and get the table and field name.
    in most cases it might be structure. either way, go to se11 and type the table/structure name and then search for the field name in that table.
    then dbl click on the data element and click on the where-used button.
    now select table entries and start looking for all the tables where the field is present. go to each table and check for the number of table entries and see if the value u entered has been caputred in that table or not.
    hope that helps.
    else u can revert back
    regards,
    pk

  • HT201472 Is there any way how to find out where a particular device was when it last went online if longer than 24 hours ago?

    One Mac Book Air was stoilen frm me, I can still see it on Find my Iphone and can see that it has been renamed. The computer was offline for longer than 24 hours, so I am wondering if there is any way how I can find out it's last online location?

    No, you cannot find out where the computer has been. Find My Mac only shows you were the computer is right now if it is online.
    I strongly recommend you change all your internet passwords immediately, notify the police (do not try to recover your MBA yourself), and your insurance company so you can get reimbursed and buy a new Mac. Once you have done all this go back to Find My Mac and click the "Erase" button.

  • How to find out where a variable has been used?

    How can I find out where a variable has been used within a package/interface/procedure?
    Should I check it using repository's internal tables?
    Thanks

    Hi,
    you have to make some queries to find variable used in which ODI object.
    like, it fetch the variable with scenario name and scenarion can serve your need.
    select v.i_var,v.var_name,s.scen_name from
    ODEV91119_ODI_WORK.snp_var v,ODEV91119_ODI_WORK.snp_scen s
    where
    s.i_var=v.i_var
    and s.scen_NAME='V_BTCH_NAME'
    and agree with SH answer
    Thanks

  • How to find out the T-code of a program

    Hi Experts,
      I want to find out the T-codes of some programs. For that I am passing the program name in  TSTC table and I am getting the T-code.
      But TSTC table gives T-code for only main program and not for the includes. Is there any way to find out the T-codes for include programs also?
    Thanks and regards,
    Venkat

    Hi,
    there wont be tcodes for include programs....
    u can find the tcode for a running program through  Menu->system->status (now a window opens,here u can see transaction ie.,tcode).
    Also when the program is not running,take se80 and put the program name,in the tree u can see the transaction attached.
    Regards
    Sajid

  • How to find out whether a program is running in Hyper-V virtual machine or not?

    If I want to make a program which only running in Hyper-V virtual machine, how can I find out whether
    the program is running in Hyper-V  virtual machine or not?

    https://gallery.technet.microsoft.com/scriptcenter/Determine-if-a-computer-is-cdd20473
    http://social.technet.microsoft.com/wiki/contents/articles/942.hyper-v-how-to-detect-if-a-computer-is-a-vm-using-script.aspx
    http://www.grouppolicy.biz/2014/01/how-to-target-group-policy-to-virtual-computers/
    Mike Crowley | MVP
    My Blog --
    Baseline Technologies

  • How to find out if a process is running or not

    Hi
    I need to find out if a process is running or not in my system
    If it is running i Need to stop the process
    Can anyone help me with this.

    ctrl+alt+delete and look at the processes that are running on your system. I usually click on the memory headerbar so it sorts them my the process that is using the most memory. :-)

Maybe you are looking for

  • Acrobat 5.0 & Reader 9.0 Problems reading web PDFs

    Greetings, I'm running Acrobat 5.0 and Reader 9.0. When I click on a web link to a PDF I receive this error message: i The Adobe Acrobat/Reader that is running can not be used to view PDF files in a Web Browser. Adobe Acrobat/Reader version 8 or 9 is

  • Interactive PDF

    Hi, I'm working on creating an interactive PDF in InDesign CS5 and cannot figure out the best way to have buttons click to the appropriate page. It's a newsletter/article archive with an index at the front. The first couple pages list the articles in

  • Selection Sort troubles

    I am doing a practice exercise involving a Selection Sort. I keep getting 2 errors when I compile and not sure what to do to fix them. Thanks in advance for your help! Here are the two errors: SortArray.java:79: illegal start of expression      priva

  • Date Validation in JSF & Richfaces

    I m using a rich:calendar to display Date in my application But some how date validation isn't working properly in a particular scenario. i.e it some one enters date as 05/05/2010sfc in this case it automatically trims the extra characters in the end

  • Patch Info needed

    I am on 11.2.0.1 on RHEL Linux 5.6 and on Standalone single instance Grid Infrastructure , lets say i want to apply a patch, assuming this patch needs a shutdown of all components, So apart of Database instance and Listener running from grid home, wh