Application context & Finegrain Security

I tried to inplement security on table (row level) using application context & Fine grain. Policy predictate function for fine grain works fine. but when I tried to use application context & fine grain together it says no rows found all the time. So something going wrong in application context. if any body know this topic pls respond.
null

Actually, our aim is to change our client/server tech. to web enabled.
According to my study in google and in oracle forums......
Server1:
OS: RHEL 5
DB: oracle database 10g
In this server what security softwares i have to install?
What else i have to install in server1?
Server2:
OS: RHEL 5
OAS: Oracle Application Server (which version to install?)
In oracle application server what are all the components i have to select while installing
In this server what security softwares i have to install?
what else i have to install in server2?
Do i need anyother server? if yes, what i should install in that server? what is for?
thanks

Similar Messages

  • Application Context Security

    Is there any limitations on the value that the Application Context can hold?

    Dear Frank,
    <i>
    Instead you have a single identity management system and have the application policies being different for the applications.Using ADF Security, users and groups can have different privileges in different applications
    </i>
    suppose i have 3 applications that use adf security, the users will be common to all applications. right..?Roles and group can be different for applications.
    application polices means roles and group..?
    So how it(application polices) can be made different for applications? is it inbuilt or some configurations needed ?. Can you point me to some blogs or tutorials for more reference.
    Bet: Incase i hook up adf security with database schema.
    Regards,
    Santosh.

  • Configuring roles and users (adf security) application context wise.

    Dear All,
    I referred this tutorial (http://biemond.blogspot.com/2008/12/using-database-tables-as-authentication.html) which shows how to hook up adf security with database schema but at domain level which will be common to all applications in that domain. I want to make it different to each application. (i.e each application will use differene database schema for storing user credientials i.e enterprise roles,application roles and users.)
    Can any one please point me to proper way..
    Regards,
    Santosh
    jdev 11.1.1.2.0

    Dear Frank,
    <i>
    Instead you have a single identity management system and have the application policies being different for the applications.Using ADF Security, users and groups can have different privileges in different applications
    </i>
    suppose i have 3 applications that use adf security, the users will be common to all applications. right..?Roles and group can be different for applications.
    application polices means roles and group..?
    So how it(application polices) can be made different for applications? is it inbuilt or some configurations needed ?. Can you point me to some blogs or tutorials for more reference.
    Bet: Incase i hook up adf security with database schema.
    Regards,
    Santosh.

  • Application Context - VPD

    APEX: 2.0.0.00.49
    DB: 10R2
    I am using table based security. Upon login, I am setting a number of different context variables (e.g., sessionid, userid, name, etc). They are also being set in my application (F100_SESSIONID, F100_USERID, etc).
    Recently, our company decided to host another company's data. Not having EE, I decided to add a column to the appropriate tables and then create views accessible through the application. Each view would have a predicate:<BR>
    WHERE companycode = SYS_CONTEXT( 'PFS_CTX', 'COMPANYCODE' )<br>
    Now, after submit, (I haven't tested every single page), session state seems to be lost.<br>
    Debug info before Submit:<br>
    0.00: S H O W: application="100" page="26" workspace="" request="" session="12483598699829578467"
    0.00: ...Language derived from: FLOW_PRIMARY_LANGUAGE, current browser language: en-us
    0.00: alter session set nls_language="AMERICAN"
    0.00: alter session set nls_territory="AMERICA"
    0.00: NLS: CSV charset=WE8MSWIN1252
    0.00: ...Setting NLS Decimal separator="."
    0.00: ...Setting NLS Group separator=","
    0.00: ...Setting NLS date format="DD-MON-RR"
    0.00: NLS: Language=en-us
    0.00: Application 100, Authentication: CUSTOM2, Page Template: 653625525474071
    0.02: ...Supplied session ID can be used
    0.02: ...Application session: 12483598699829578467, user=USER_PFS
    0.02: ...Determine if user PFS_ADMIN with SGID 635206529335328 can develop application 100 in workspace 635206529335328
    0.02: Fetch session state from database
    0.02: Fetch session header information
    0.02: ...fetch page attributes: f100, p26
    0.02: Branch point: BEFORE_HEADER
    0.03: Fetch application meta data
    0.03: Computation point: BEFORE_HEADER
    0.03: Processing point: BEFORE_HEADER
    0.03: Show page template header
    0.03: Computation point: AFTER_HEADER
    0.03: Processing point: AFTER_HEADER<br>
    The Select List I have renders correctly. The query behind the Select List is:<br>
    SELECT projectname, projectid
    FROM pnet_projects<br>
    The view text is:<br>
    SELECT projectid, projectname,...
    FROM vw_projects
    WHERE companycode = SYS_CONTEXT( 'PFS_CTX', 'COMPANYCODE' )<BR>
    After Submit, the Select List is empty and here is the Debug info:<br>
    0.00: A C C E P T: Request="SUBMIT"
    0.00: Fetch application info
    0.00: wwv_flow.g_flow_language_derived_from=FLOW_PRIMARY_LANGUAGE: wwv_flow.g_browser_language=en-us
    0.00: alter session set nls_language="AMERICAN"
    0.00: alter session set nls_territory="AMERICA"
    0.00: NLS: CSV charset=WE8MSWIN1252
    0.00: ...Setting NLS Decimal separator="."
    0.00: ...Setting NLS Group separator=","
    0.00: ...Setting NLS date format="DD-MON-RR"
    0.02: Fetch session state from database
    0.02: ...Check instance 12483598699829578467 owner
    0.02: ...Fetch iconbar, page, computation, process, ...
    0.02: Fetch session header information
    0.02: ...fetch page attributes: f100, p26
    0.02: ...Check security schemes
    0.02: Save form items and p_arg_values
    0.02: ...P26_PROJECTID session state saving same value: "NONE"
    0.02: ...P26_TIMEIN session state saving same value: ""
    0.03: ...P26_PERSONID session state saving same value: ""
    0.03: Processing point: ON_SUBMIT_BEFORE_COMPUTATION
    0.03: Branch point: BEFORE_COMPUTATION
    0.03: Computation point: AFTER_SUBMIT
    0.03: Perform Branching for Tab Requests
    0.03: Branch point: BEFORE_VALIDATION
    0.03: Perform validations:
    0.03: Display inline error messages that are a result of failed validations.
    0.03: S H O W: application="100" page="26" workspace="" request="" session="12483598699829578467"
    0.03: NLS: Language=en-us
    0.03: Application 100, Authentication: CUSTOM2, Page Template: 653625525474071
    0.05: ...Supplied session ID can be used
    0.05: ...Application session: 12483598699829578467, user=USER_PFS
    0.05: ...Determine if user PFS_ADMIN with SGID 635206529335328 can develop application 100 in workspace 635206529335328
    0.05: ...fetch page attributes: f100, p26
    0.05: Branch point: BEFORE_HEADER
    0.05: Fetch application meta data
    0.05: Computation point: BEFORE_HEADER
    0.05: Processing point: BEFORE_HEADER
    0.05: ......do not perform process because inline validation condition found.
    0.05: ...Recompute field lables for fields in error.
    0.05: Show page template header   
    0.05: Computation point: AFTER_HEADER
    0.05: Processing point: AFTER_HEADER<br>
    In the ACCEPT portion, there's a line "Fetch session state from database" which I am guessing gets the Application Context. There is no such line in the SHOW section.<br><br>
    I have used Branch to Page Identified by Item and a Branch to Page or URL. Same result.<br><br>
    Does anyone have a suggestion as to how I should proceed? Can I use APEX/Application Context in this manner?<br><br>
    chet

    FUNCTION login
      (p_username IN VARCHAR2,
       p_password IN VARCHAR2,
       p_systemcode IN VARCHAR2 DEFAULT 'PFS') RETURN NUMBER
    IS
      l_sessionid NUMBER(15);
      l_password PERSON_SYSTEMS_TAB.PASSWORD%TYPE;
      l_personsystemid PERSON_SYSTEMS_TAB.PERSONSYSTEMID%TYPE;
      l_personid PERSON_SYSTEMS_TAB.PERSONID%TYPE;
      l_passwordexpires PERSON_SYSTEMS_TAB.PASSWORD_EXPIRES%TYPE;
      l_accountlocked PERSON_SYSTEMS_TAB.ACCOUNTLOCKED%TYPE;  
      l_expiredate DATE;
      l_entityid ENTITY_TAB.ENTITYID%TYPE;
      l_companyname VARCHAR2(150);
      l_companycode VARCHAR2(30);
    BEGIN
      SELECT password, personsystemid, personid, password_expires, accountlocked, date_expired, companycode
      INTO l_password, l_personsystemid, l_personid, l_passwordexpires, l_accountlocked, l_expiredate, l_companycode
      FROM vw_person_systems
      WHERE systemcode = p_systemcode
        AND date_expired IS NULL
        AND UPPER( username ) = UPPER( p_username );
      IF l_password = p_common.hash(p_username, p_password) THEN --successful login
      --1 create session
      --2 set app context
      --3 return sessionid
        l_sessionid := create_session( l_personsystemid );
        l_companyname := p_common.get_company_name( l_personid ); 
        l_entityid := p_common.get_entityid( l_personid );
        p_ctx.set_sessionid( l_sessionid );        
        p_ctx.set_context( 'NAME', p_login.get_name( l_personid ) );
        p_ctx.set_context( 'PERSONSYSTEMID', l_personsystemid );
        p_ctx.set_context( 'PERSONID', l_personid );
        p_ctx.set_context( 'COMPANYID', SUBSTR( l_companyname, 1, INSTR( l_companyname, ':' ) - 1 ) );
        p_ctx.set_context( 'COMPANYNAME', SUBSTR( l_companyname, INSTR( l_companyname, ':' ) + 1, LENGTH( l_companyname ) ) );
        p_ctx.set_context( 'SESSIONID', l_sessionid );
        p_ctx.set_context( 'EMAILADDRESS', p_username );
        p_ctx.set_context( 'ENTITYID', l_entityid );
        p_ctx.set_context( 'COMPANYCODE', l_companycode );
      END IF;
      RETURN l_sessionid;
    EXCEPTION
      WHEN no_data_found THEN
        raise_application_error(-20002, 'invalid username');
    END login;<br>
    None of this code has changed in quite some time. The only thing that changed was the view reference from APEX. This seems to occur only when the page is submitted (with or without validations).

  • Report Export - No data when query based on Application Context

    I updated my Query Region source to use a Global Application Context and now the Report Export (to .csv) download has no data. This appears to run the query again in under a different session_id perhaps(?)
    In a before header process I set the session_id to access a couple of date values set by the user via LOVs - the 'Search' button and an After Submit Process sets the context values which are accessed in the where clause, i.e
    where date_attribute between to_date( SYS_CONTEXT('MY_CTX', 'START_DATE'), 'dd-Mon-yyyy')
    and to_date( SYS_CONTEXT('MY_CTX', 'END_DATE'), 'dd-Mon-yyyy')
    If you know any solution or alternative approach I'd be very grateful for your tips. I like Apex because you can leverage core Oracle database technology but then in some case you do hit these little troubles!
    Thanks
    Craig

    Thanks for the link to the posts.
    I considered the Security Attribute but thought that was somewhat inappropriate for just the one page I am setting the context; I understand the Security Attribute function would set 'My_Ctx' values on all page requests.

  • Ask the Expert: Introduction to Cisco Adaptive Security Appliance (ASA) version 9.x (Context Aware Security and VPN Features)

    With Namit Agarwal and Rahul Govindan 
    Welcome to the Cisco Support Community Ask the Expert conversation. This is an opportunity to learn and ask questions about Cisco Adaptive Security Appliance (ASA) version 9.x (Context Aware Security and VPN Features) with experts Namit Agarwal and Rahul Govindan.
    This is a continuation of the live webcast.
    Cisco ASA CX (Context-Aware) is a next generation firewall service that serves as an extension to the Cisco Adaptive Security Appliance (ASA) firewall platform. In addition to the proven stateful inspection firewall capabilities, it provides us with next-generation capabilities and a host of additional network-based security controls for end-to-end network intelligence and streamlined security operations.
    Namit Agarwal is a customer support engineer at the Cisco Technical Assistance Center in Bangalore, India. He has more than four years of experience in the security domain. His areas of expertise include ASA firewalls, IPS, and ASA content-aware security (ASA CX). He has been involved in various escalation requests from around the world. He holds CCIE certification (number 33795) in security.   
    Rahul Govindan has been an engineer with the Security Technical Assistance Center team in Bangalore for more than three years. He works on security technologies such as VPN; Cisco ASA firewalls; and authentication, authorization, and accounting. His particular expertise is in Secure Sockets Layer VPN and IP security VPN technologies. He holds CCIE certification (number 29948) in security.
    Remember to use the rating system to let Namit and Govindan know if you have received an adequate response. 
    Because of the volume expected during this event, Namit and Govindan might not be able to answer every question. Remember that you can continue the conversation in the Security community, subcommunity VPN shortly after the event. This event lasts through November 1, 2013. Visit this forum often to view responses to your questions and the questions of other Cisco Support Community members.
    Webcast related links:
    Slides from the live webcast
    Video Recording of the live webcast
    Introduction to Cisco Adaptive Security Appliance (ASA) version 9.x (Context Aware Security and VPN Features): FAQ from live webcast

    Hello Namit and Rahul,
    Here are few questions that came in directly during your live webcast hence posting them here so that users can benifit:
    1)      How is ASA CX different from other UTM solutions ?
    2)      How is dynamic application inspection of CX better than other inspection engines  ?
    3)      What features or functionalities on the CX are available by default ?
    4)      what are the different ways we can run or install CX on the ASA platform ?
    5)      What VPN features are supported with multi context ASA in the 9.x release ?
    6)      What are the IPv6 Enhancements in the ASA version 9.x ?
    Request you to please provide your responses to them individually.
    Thanks.

  • Setting Application Context Attributes for Enterprise Users Based on Roles

    Hello,
    We have an Oracle 11g database with a table containing data from multiple sites (a SiteID field identifies the site for a record). Since application users can have access to different subsets of sites, we would like to use Oracle's Virtual Private Database feature to enforce row-level security on the table.
    I did a successful proof-of-concept with database users. I created a role for each site (example: USER_SITE_A, USER_SITE_B, ...), and then assigned the appropriate site roles to each database user. I then created a package (run via a logon trigger) which set application context attributes for each site. If the current database user has been assigned a role for a given site, then the corresponding attribute named "SITE_PRIVILEGE_SiteID" is set to 'Y'... otherwise, it is set to 'N'. Here is the code which worked to set application context attributes for database users:
    -- For each record in my RoleSitePrivileges table, set
    --   an attribute named 'SITE_PRIVILEGE_<SiteID>'.
    --   If the current user has been assigned a role matching
    --   the value in the 'RoleName' field, set the corresponding
    --   attribute to 'Y'... otherwise, set it to 'N'.
    FOR iPrivRec IN (SELECT RoleName, SiteID
                       FROM RoleSitePrivileges
                       ORDER BY SiteID)
       LOOP
          SELECT COUNT(*)
            INTO roleExists
            FROM dba_role_privs
            WHERE granted_role = UPPER(iPrivRec.RoleName)
              AND grantee = USER;
          IF roleExists > 0 THEN
             DBMS_SESSION.set_context(
                         namespace   => 'my_ctx',
                         attribute   => 'SITE_PRIVILEGE_' || iPrivRec.SiteID,
                         value       => 'Y');
          ELSE
             DBMS_SESSION.set_context(
                         namespace   => 'my_ctx',
                         attribute   => 'SITE_PRIVILEGE_' || iPrivRec.SiteID,
                         value       => 'N');
          END IF;
       END LOOP;To finish things off, I created a security policy function for the table which returns the following:
    RETURN 'SiteID IN (SELECT TO_NUMBER(SUBSTR(attribute, 15))
                         FROM session_context
                         WHERE attribute LIKE ''SITE_PRIVILEGE_%''
                            AND value = ''Y'')';This setup worked great for database users. I am now working to do a comparable proof-of-concept for enterprise users created in Oracle Internet Directory (OiD). I have Enterprise User Security (EUS) up and running with OiD, global roles created in the database, enterprise roles defined in EUS with global role assignments, and enterprise roles assigned to OiD users. The enterprise users are able to successfully login to the database, and I can see the appropriate global role assignments when I query the session_roles view.
    I tried using the same application context package, logon trigger, and security policy function with the enterprise users that I had used with the database users. Unfortunately, I found that the application context attributes are not being set correctly. As you can see from the code above, the applicaiton context package was referencing the dba_role_privs view. Apparently, although this view is populated for database users, it is not populated for enterprise users.
    I tried changing the application context package to use invoker's rights and to query the session_roles view instead of the dba_role_privs view. Although this package sets the attributes correctly when called manually, it does not work when called from the logon trigger. That was an oops on my part, as I didn't realize initially that a PL/SQL procedure cannot be called with invoker's rights from a trigger.
    So, I am now wondering, is there another view that I could use in code called from a logon trigger to access the roles assigned to the enterprise user ? If not, is there a better way for me to approach this problem? From a maintenance standpoint, I like the idea of controlling site access from the LDAP directory service via role assignments. But, I am open to other ideas as well.
    Thank you!

    Hello,
    We have an Oracle 11g database with a table containing data from multiple sites (a SiteID field identifies the site for a record). Since application users can have access to different subsets of sites, we would like to use Oracle's Virtual Private Database feature to enforce row-level security on the table.
    I did a successful proof-of-concept with database users. I created a role for each site (example: USER_SITE_A, USER_SITE_B, ...), and then assigned the appropriate site roles to each database user. I then created a package (run via a logon trigger) which set application context attributes for each site. If the current database user has been assigned a role for a given site, then the corresponding attribute named "SITE_PRIVILEGE_SiteID" is set to 'Y'... otherwise, it is set to 'N'. Here is the code which worked to set application context attributes for database users:
    -- For each record in my RoleSitePrivileges table, set
    --   an attribute named 'SITE_PRIVILEGE_<SiteID>'.
    --   If the current user has been assigned a role matching
    --   the value in the 'RoleName' field, set the corresponding
    --   attribute to 'Y'... otherwise, set it to 'N'.
    FOR iPrivRec IN (SELECT RoleName, SiteID
                       FROM RoleSitePrivileges
                       ORDER BY SiteID)
       LOOP
          SELECT COUNT(*)
            INTO roleExists
            FROM dba_role_privs
            WHERE granted_role = UPPER(iPrivRec.RoleName)
              AND grantee = USER;
          IF roleExists > 0 THEN
             DBMS_SESSION.set_context(
                         namespace   => 'my_ctx',
                         attribute   => 'SITE_PRIVILEGE_' || iPrivRec.SiteID,
                         value       => 'Y');
          ELSE
             DBMS_SESSION.set_context(
                         namespace   => 'my_ctx',
                         attribute   => 'SITE_PRIVILEGE_' || iPrivRec.SiteID,
                         value       => 'N');
          END IF;
       END LOOP;To finish things off, I created a security policy function for the table which returns the following:
    RETURN 'SiteID IN (SELECT TO_NUMBER(SUBSTR(attribute, 15))
                         FROM session_context
                         WHERE attribute LIKE ''SITE_PRIVILEGE_%''
                            AND value = ''Y'')';This setup worked great for database users. I am now working to do a comparable proof-of-concept for enterprise users created in Oracle Internet Directory (OiD). I have Enterprise User Security (EUS) up and running with OiD, global roles created in the database, enterprise roles defined in EUS with global role assignments, and enterprise roles assigned to OiD users. The enterprise users are able to successfully login to the database, and I can see the appropriate global role assignments when I query the session_roles view.
    I tried using the same application context package, logon trigger, and security policy function with the enterprise users that I had used with the database users. Unfortunately, I found that the application context attributes are not being set correctly. As you can see from the code above, the applicaiton context package was referencing the dba_role_privs view. Apparently, although this view is populated for database users, it is not populated for enterprise users.
    I tried changing the application context package to use invoker's rights and to query the session_roles view instead of the dba_role_privs view. Although this package sets the attributes correctly when called manually, it does not work when called from the logon trigger. That was an oops on my part, as I didn't realize initially that a PL/SQL procedure cannot be called with invoker's rights from a trigger.
    So, I am now wondering, is there another view that I could use in code called from a logon trigger to access the roles assigned to the enterprise user ? If not, is there a better way for me to approach this problem? From a maintenance standpoint, I like the idea of controlling site access from the LDAP directory service via role assignments. But, I am open to other ideas as well.
    Thank you!

  • Setting session variables in application context using OpenJPA

    Hi!
    I am using openjpa 1.2 with EJB 3.0. I am connecting to Oracle 11g database and need to use the oracle virtual private database for security and data segregation. For this purpose, I need to set some custom variables at the session level of the application context such as the application user name. Since, I am using container injected EntityManager using @PersistenceContext, I am finding it hard to do so.
    Can anyone please help me out
    Thanks in advance
    Abhi

    You will probably want to ask your question on an OpenJPA forum to see if they even can support VPD (if not, see EclipseLink http://wiki.eclipse.org/Introduction_to_EclipseLink_Sessions_(ELUG)#Isolated_Client_Sessions_and_Oracle_Virtual_Private_Database_.28VPD.29 )
    You might also want to try injecting the factory instead and use that to get the EntityManager instead of injecting the em directly. ie
    @PersistenceUnit(unitName="my-pu")
    private EntityManagerFactory emf;
    Best Regards,
    Chris

  • Global Application Contexts - Where to set Client Identifier?

    Hi,
    I am trying to use global application contexts as part of an implementation of fine grain access control.
    This is within an eBusiness Suite environment, specifically CRM, so is a multi-tiered environment.
    Users access both Forms based screens and OA framework screens.
    I believe I need to use global application contexts as users may have multiple database sessions.
    Also, all users will login using the same database login account.
    Provided I can set a unique identifier for a user that persists throughout all their sessions I can make use of the username and client_id parameters of set_context, below:-
    DBMS_SESSION.set_context (namespace => 'XXUOM_CONTEXTS',
    attribute => 'EXEMPT_FROM_VPD_POLICIES',
    VALUE => l_exempt,
    username => USER,
    client_id => pi_user_id);
    The difficulty I am having is finding a suitable place to set the client identifier.
    I am not sure if the value is being cleared by some other code or if the value isn't being set in all sessions.
    I am using:-
    DBMS_SESSION.set_identifier (pi_user_id)
    That I call from after insert triggers on either tables icx_sessions or fnd_logins.
    However, the client identifier is always null when I query it from within the application, via:-
    SELECT SYS_CONTEXT ('USERENV', 'CLIENT_IDENTIFIER') from dual
    If I set the value via a personalisation rule within a Form, then the value remains.
    I would greatly appreciate it if someone can advise me on where I am going wrong.
    Andy

    It's a different patch.
    The patch support have given me is 9275708, FND_GLOBAL.ORG_NAME RETURNS ENGLISH, EVEN WHEN SESSION LANGUAGE IS NOT.
    This patch has been superceded by 12875860, HR SECURITY PROFILE IS NOT SET CORRECTLY.
    So we have applied patch 12875860.
    I've tried to find out from support what happened to the original patch and why it was removed/deleted rather than superceded.
    I have not found it possible to find out what each of these patches does. There's very little documentation on them.
    I have raised an SR.
    The details are 3-4943519401: How to add DBMS_SESSION.SET_IDENTIFIER() to FND_GLOBAL.INITIALIZE.
    The results of:
         select fnd_profile.value('FND_CONNECTION_TAGGING') from dual
         gives nothing on our Release 11 environment.
    select * from fnd_profile_options where profile_option_name = 'FND_CONNECTION_TAGGING';
    gives nothing.
    On Release 12, the results are:
         select fnd_profile.value('FND_CONNECTION_TAGGING') from dual;
         ENABLED
         select * from fnd_profile_options where profile_option_name = 'FND_CONNECTION_TAGGING';
         returns a record.
    Many thanks for continuing to look into this for me.
    Andy

  • Using Application Module outside ADF Application context

    I am trying to run application module using a standalone java class. Trying to use Application Module outside ADF Application context.
    I have created a jar file on my standalone java class, and added my ADF application jar files to the classpath while running my standalone java file as a Jar file.
    I could connect to the application module and I am able to get the response from my application module.
    Below is the code I used to invoke my application module method from my standalone java class.
         public static void main(String[] args) {
              System.out.println("Testing .....");
             String jdbcURL = "jdbc:oracle:thin:@localhost:1521:XE";
             Hashtable env = new Hashtable();
             env.put(Context.INITIAL_CONTEXT_FACTORY, JboContext.JBO_CONTEXT_FACTORY);
             env.put(JboContext.DEPLOY_PLATFORM, JboContext.PLATFORM_LOCAL);
             try {
                 Context ic = new InitialContext(env);
                 String defName = "com.org.model.BatchJobAppModule";
                 ApplicationModuleHome home = (ApplicationModuleHome)ic.lookup(defName);
                 ApplicationModule mbApplicationModule= (ApplicationModule)home.create();
                 mbApplicationModule.getTransaction().connect(jdbcURL, "HR", "HR");
                    ((BatchJobAppModuleImpl)mbApplicationModule).connectToDatabase();
             } catch (NamingException ne) {
                 // TODO: Add catch code
                 ne.printStackTrace();
    {code}
    I am getting following messages.
    {code: warning}
    oracle.adf.share.ADFContext getCurrent
    WARNING: Automatically initializing a DefaultContext for getCurrent.
    Caller should ensure that a DefaultContext is proper for this use.
    Memory leaks and/or unexpected behaviour may occur if the automatic initialization is performed improperly.
    This message may be avoided by performing initADFContext before using getCurrent().
    To see the stack trace for thread that is initializing this, set the logging level of oracle.adf.share.ADFContext to FINEST
    Dec 14, 2012 10:16:37 PM oracle.security.jps.internal.config.xml.XmlConfigurationFactory initDefaultConfiguration
    SEVERE: java.io.FileNotFoundException: D:\satya\testPackage\.\config\jps-config.xml (The system cannot find the path specified)
    {code}
    I have another question regarding connecting to database.
    How to get connection from a datasource, to avoid supplying database credentials which will vary from one environment to another.
    Please let me know if any one has pointers.
    Thanks in advance.
    Regards,
    Satya
    Edited by: 921138 on Dec 14, 2012 9:20 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Thanks Shay for your response.
    When I run the standalone java class from jDeveloper 11.1.1.5.0, I am able to get application module and also able to get the out put from application module method. While running the java class jdev is exectung the class with javaw command. I tried to execute the same from commnd prompt, it didn't print anything on the command prompt. So I tried to execute java command with "java followed by class path" as below.
    set JAVA_HOME=C:\Oracle\Middleware\jdk160_24\jre
    set PATH=%JAVA_HOME%\bin;%PATH%
    java -classpath E:\poc\TestBatchJobClient\Project1\deploy\First.jar;E:\poc\BatchJobApp\Model\deploy\adf-share-base.jar;E:\poc\BatchJobApp\Model\deploy\adfm.jar;E:\poc\BatchJobApp\Model\deploy\BatchJobApp_Model.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.adf.share_11.1.1\adf-share-support.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.adf.share.ca_11.1.1\adf-share-ca.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.adf.share.ca_11.1.1\adf-share-base.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.adf.share_11.1.1\adflogginghandler.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.adf.share_11.1.1\adfsharembean.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.jmx_11.1.1\jmxframework.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.jmx_11.1.1\jmxspi.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.idm_11.1.1\identitystore.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.adf.model_11.1.1\adfm.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.adf.model_11.1.1\bc4j-mbeans.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.adf.model_11.1.1\bc4jwizard.jar;C:\Oracle\Middleware\oracle_common\modules\groovy-all-1.6.3.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.xdk_11.1.0\xmlparserv2.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.adf.model_11.1.1\db-ca.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.adf.model_11.1.1\jdev-cm.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.ldap_11.1.1\ojmisc.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.adf.share_11.1.1\commons-el.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.adf.share_11.1.1\jsp-el-api.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.adf.share_11.1.1\oracle-el.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.javatools_11.1.1\resourcebundle.jar;C:\Oracle\Middleware\modules\javax.activation_1.1.0.0_1-1.jar;C:\Oracle\Middleware\modules\javax.mail_1.1.0.0_1-4-1.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.mds_11.1.1\oramds.jar;C:\Oracle\Middleware\modules\javax.servlet_1.0.0.0_2-5.jar;C:\Oracle\Middleware\modules\javax.jsp_1.2.0.0_2-1.jar;C:\Oracle\Middleware\jdeveloper\ide\macros\..\..\..\wlserver_10.3\server\lib\ojdbc6.jar;C:\Oracle\Middleware\oracle_common\jlib\commons-cli-1.0.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.bali.share_11.1.1\share.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.xmlef_11.1.1\xmlef.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.dms_11.1.1\dms.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.xdk_11.1.0\xml.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.javacache_11.1.1\cache.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.ucp_11.1.0.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.odl_11.1.1\ojdl.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.javatools_11.1.1\javatools-nodeps.jar;C:\Oracle\Middleware\modules\javax.management_1.2.1.jar;C:\Oracle\Middleware\modules\javax.management.j2ee_1.0.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.mds_11.1.1\mdsrt.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.ldap_11.1.1\ldapjclnt11.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.jps_11.1.1\jps-api.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.jps_11.1.1\jps-common.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.jps_11.1.1\jps-ee.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.jps_11.1.1\jps-internal.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.jps_11.1.1\jps-unsupported-api.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.jps_11.1.1\jps-manifest.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.jps_11.1.1\jacc-spi.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.pki_11.1.1\oraclepki.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.osdt_11.1.1\osdt_core.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.osdt_11.1.1\osdt_cert.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.osdt_11.1.1\osdt_xmlsec.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.osdt_11.1.1\osdt_ws_sx.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.iau_11.1.1\fmw_audit.jar;C:\Oracle\Middleware\modules\javax.security.jacc_1.0.0.0_1-1.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.adf.security_11.1.1\adf-share-security.jar -Djavax.net.ssl.trustStore=C:\Oracle\Middleware\wlserver_10.3\server\lib\DemoTrust.jks com.org.TestMyClass
    {code}
    I got the same old error.
    Regards,
    Satya                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Getting values from application context

    I want to set an input box with the value from the jsp getRemoteHost() in jsf page..
    In my page i have this
    <h:inputText value="#{sok.Searchstring}">...
    where the reference sok is a java bean
    public class sok
         private String Searchstring;
         public sok()
              // I want to set the Searchstring = getRemoteHost()
         public String getSearchstring()
            return this.sokVerdi;
        public void setSearchstring(String data)
            this.sokVerdi = data;
    }How can this be done? Should I avoid using http request.. couldn't I get it from the application context, and how do I do that?? I'am kinda empty on ideas to solve this very issue.

    I getting the getRemoteHost to work perfectly.. and as for getParameter() too.. but when I try doing getRemoteUser(), it gives me null.. I also did getRemoteUser() in the jsf file, and there I do get the right output..
    How come? Why do I not get the correct value from the java bean?
    public sok()
              ExternalContext externalContext = FacesContext.getCurrentInstance().getExternalContext();
              HttpServletRequest httpServletRequest = (HttpServletRequest)externalContext.getRequest();
              sokVerdi = "h: " + httpServletRequest.getRemoteUser();
              //sokVerdi = "g: " + httpServletRequest.getParameter("fardin");
                   //sokVerdi = "g: " + httpServletRequest.getRemoteHost();
         }

  • Multiple values in 1 application context

    All, I'm trying to return multiple values from a query and store them in an application context.
    I have an employee that can be a part of multiple divisions. I already captured emp_id:
    dbms_session.set_context('COMPANY', 'emp_id', emp_id);
    but also want to capture division_id for the person. Most people will only have 1 division_id, but some will have multiple division_id's.
    What's the best way for me to capture multiple numeric values and store them in an application context like this.
    I'm trying to set up VPD policies and don't have to have to reissue a query every time I need to access the division_id.
    Thanks,
    Jon.

    One option would be to store a comma-delimited list of the division_ids in the context and then your VPD filter can use this and the TABLE function to limit the rows:
    sql>create or replace type NumberTable as table of number;
      2  /
    Type created.
    sql>create or replace function f_number_table(
      2    p_list       in  varchar2,
      3    p_delimiter  in  varchar2 default ',')
      4    return numbertable
      5  is
      6    v_string  long := p_list || p_delimiter;
      7    v_pos     pls_integer;
      8    v_data    numbertable := numbertable();
      9  begin
    10    loop
    11      v_pos := instr(v_string, p_delimiter);
    12      exit when (nvl(v_pos, 0) = 0);
    13      v_data.extend;
    14      v_data(v_data.count) := trim(substr(v_string, 1, v_pos - 1));
    15      v_string := substr(v_string, v_pos + 1);
    16    end loop;
    17    return (v_data);
    18  end f_number_table;
    19  /
    Function created.
    Then, in your VPD package:
    -- build a list of the division_ids by looping through a cursor
    -- set the context using this list of division_ids:
    dbms_session.set_context('company', 'div_id', '10,20');
    -- later, you would replace the literal value below with a call to sys_context to retrieve it
    sql>select empno, ename, deptno
      2    from emp
      3   where deptno in (select *
      4                      from table(f_number_table('10,20')));
        EMPNO ENAME         DEPTNO
         7782 CLARK             10
         7839 KING              10
         7934 MILLER            10
         7369 SMITH             20
         7876 ADAMS             20
         7902 FORD              20
         7788 SCOTT             20
         7566 JONES             20
    8 rows selected.

  • How to define JAXP Parsers and Transformer in a Web Application Context

    Hi
    I need to define JAXP Parsers and Transformer in a Web Application Context where I can deploy this application in any J2EE Application Server without modifying the server. That means that I can't set System properties or set the jaxp.properties file. I tried to use the META-INF/services/javax.xml.transform.TransformerFactory file but it didn't work.
    Any ideas?

    Hi
    I need to define JAXP Parsers and Transformer in a Web Application Context where I can deploy this application in any J2EE Application Server without modifying the server. That means that I can't set System properties or set the jaxp.properties file. I tried to use the META-INF/services/javax.xml.transform.TransformerFactory file but it didn't work.
    Any ideas?

  • JBO-33008 Error finding application context

    Can anyone explain what causes JBO-33008 or where I can find more information on the exception. I have been unable to find any documentation (even the help in JDev goes from 34001 to 55001). Any information would be greatly appreciated.
    Thanks in advance.
    Deb
    oracle.jbo.JboException: JBO-33008: Error finding application context
    at oracle.jbo.server.ContextMetaObjectManager.getCurrentApplicationMap(ContextMetaObjectManager.java:73)
    at oracle.jbo.server.ContextMetaObjectManager.findLoadedObject(ContextMetaObjectManager.java:55)
    at oracle.jbo.mom.DefinitionManager.getDynamicObjectsContainer(DefinitionManager.java:604)
    at oracle.jbo.mom.DefinitionObject.isDynamicDefinitionObject(DefinitionObject.java:141)
    at oracle.jbo.server.DefObject.isDynamic(DefObject.java:46)
    at oracle.jbo.server.ComponentDefImpl.unsetDefForComponent(ComponentDefImpl.java:200)
    at oracle.jbo.server.ComponentObjectImpl.setDef(ComponentObjectImpl.java:53)
    at oracle.jbo.server.ViewObjectImpl.setDef(ViewObjectImpl.java:498)
    at oracle.jbo.server.ApplicationModuleImpl.removeChild(ApplicationModuleImpl.java:649)
    at oracle.jbo.server.ComponentObjectImpl.remove(ComponentObjectImpl.java:225)
    at oracle.jbo.server.ViewObjectImpl.remove(ViewObjectImpl.j[i]Long postings are being truncated to ~1 kB at this time.

    Evidently the 'Search Forum' is not catching everything. I did find this discussion by scrolling through.
    JBO-33008 error finding application context

  • Application contexts in multi-user environments

    [Oracle9i Enterprise Edition Release 9.2.0.3.0]
    Hi,
    I'm experimenting with application contexts as a means of utilizing bind variables in variable WHERE clauses.
    In a multi-user environment where the database is accessed from an application using a single user id, are there any conflicts involved when the same procedure is accessed multiple times and the same context variable is set to different values by each call? In other words, can I assume that between the time the user_id of my_context is set and the query is executed in procedure call 1 that those values will be used and not be affected by other procedure calls also setting the user_id of my_context?
    Thanks,
    Ed Holloman
    ================================================
    create or replace context my_context using my_proc;
    ================================================
    In procedure call 1 to my_proc:
    ================================================
    my_query := 'SELECT * FROM my_table ' ||
    'WHERE user_id = sys_context(''my_context'',''user_id'')';
    dbms_session.set_context('my_context', 'user_id', '12345');
    OPEN my_refcursor FOR
    my_query;
    ================================================
    In procedure call 2 to my_proc:
    ================================================
    my_query := 'SELECT * FROM my_table ' ||
    'WHERE buyer_id = sys_context(''my_context'',''user_id'')';
    dbms_session.set_context('my_context', 'user_id', '45678');
    OPEN my_refcursor FOR
    my_query;
    ================================================
    etc.

    A quick little test shows John's statement in action:
    sql>create or replace procedure test_procedure
      2    (p_value in  pls_integer,
      3     p_rc    out sys_refcursor)
      4  is
      5  begin
      6    dbms_session.set_context('TEST_CONTEXT', 'VALUE', to_char(p_value));
      7    open p_rc for select sys_context('TEST_CONTEXT', 'VALUE') from dual;
      8  end;
      9  /
    Procedure created.
    sql>var rc1 refcursor
    sql>var rc2 refcursor
    sql>exec test_procedure(1, :rc1)
    PL/SQL procedure successfully completed.
    sql>exec test_procedure(2, :rc2)
    PL/SQL procedure successfully completed.
    sql>print rc2
    SYS_CONTEXT('TEST_CONTEXT','VALUE')
    2
    1 row selected.
    sql>print rc1
    SYS_CONTEXT('TEST_CONTEXT','VALUE')
    1
    1 row selected.Note the original value (1) has not been stomped on by the second execution even though we fetched this after that second execution and fetch sequence.

Maybe you are looking for

  • How to fix my slow wifi on my Macbook Air?

    Hello! I have been having issues with wifi on my late 2010 Macbook Air. I have OSX 10.9.4. I notice that my wireless issues are fine if I'm within 10 feet from my wireless router. If I boot my same MBA using Windows, I have no issues what so ever and

  • How can I make my application as webservice

    Hi All, I'd like to know ,how can I make my application as webservice which has built on strut framework. with regards Babu H

  • C:import tag - Query string while calling servlet from JSP

    Hi, From my JSP I am calling a servlet to write back to the response stream of the JSP. From the JSP i am trying to pass some values into the query string as follows      <%      String strGetParameters = "/servlet/MyServlet?path=" + strPath;       %

  • Cmd L- Genres Grid View?

    Hi, I used to use Command L to go to current song, but every time I use either the keyboard shortcut or the View menu "Go to Current Song" I am taken to the Genres Grid view. So how do I get it working again? iTunes 9.2.1 (4)

  • I paid for a subscription

    I paid for a subscription, an entire year at that, even though I knew I wouldn't use it all that much.  Now when I log in, all my contacts are gone, I had reload my picture and it wants me to pay again.  I just want to make a call.  And after going t