ADF, toplink and 2 database users

Hello,
I'm pretty new in creating web based applications. So I did some tutorials about using ADF and Toplink.
These tutorials are really helpful, but all examples I found use only one database user.
I wonder if there is a way to handle 2 or more database users.
For example I have 2 database users A and B which have the same tables an views. Now I want to display a login dialog where a username and password can be inserted. Depending to this login data the web based application should works with the tables of database user A or user B.
Is there a way to realize this with Toplink or another technology?
Thanks in advance,
Hans

Hello Hanks
It's many was to solve your problem depending on the architecture you want implement and the type of software you want to build.
If you may want to develop your software as an asp solution, I will recommend you to see documentation about private virtual database, label security and new encryption facilities. With private vitual database on will be able to create one architecture to serve many different customers. This is for sure very interesting in term of maintenance and in term of monitoring.
If you may want to develop separate software modules that access separate schema to be more independant in the software version and evolution, you will be able to developp once in the top link manager and deploy your object in different place indicating in the mapping the source of your object (the schema). This may be done programmatically also. The top link documentation is very complete and helpful.
Best regards...hope it's help

Similar Messages

  • ADF BC and direct database call from ActionListener Method

    Hi
    I have an ADF BC application which generates a simple form . In the submit button I am calling a Java method which makes a direct database connection. The application hangs when the method does the executeUpdate() method
    public void onSubmit(ActionEvent actionEvent) {
    DBSequence prdSequenct=((DBSequence) resolveExpression("#{bindings.ProductId.inputValue}"));
              int productId = new Integer(prdSequenct.toString()).intValue();
              String productName = (String) resolveExpression("#{bindings.ProductName.inputValue}");
    update(productName,productId);
    public void update(String productName,int productId) {
    String str ="update products set product_name=? where product_id =?";
    Connection con=null;
    PreparedStatement pstmt= null;
    try {
    con = new DatabaseConnection().getConnection();
    pstmt= con.prepareStatement(str);
    pstmt.setString(1, productName)
    pstmt.setInt(2, productId)
    pstmt.executeUpdate();
    } catch (SQLException e) {
    e.printStackTrace();
    }finally {
    try
    pstmt.close();
    con.close();
    }catch(SQLException sqle) {
    sqle.printStackTrace();
    when I submit the form the update() method hangs at executeUpdate();
    If I run the update() method from a standalone java its works fine.Can anybody tell what could be the issue ?
    Thanks
    Suneesh
    Edited by: Suneesh Raman on Aug 18, 2010 10:14 AM

    I am using jDev Studio Edition Version 11.1.1.2.0 . Infact I need to call a PL/SQL api from the onSubmit method which I set in the action listener of submit button of the form.
    My getConnection method is :
         public Connection getConnection() throws SQLException {
              DriverManager.registerDriver(new OracleDriver());
              Connection con =
              DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:XE","rme_pbkr", "rme_pbkr");
              OracleDataSource ods = new OracleDataSource();
              ods.setUser("rme_pbkr");
              ods.setPassword("rme_pbkr");
              ods.setURL("jdbc:oracle:thin:@localhost:1521:XE");
    System.out.println("::: con = :::"+con);
              return ods.getConnection();
    Does that mean we cannot make a db connection from the actionlistener implementation method ?
    How to put the method in AM implementation class ? Just write a public void method there and call from onSubmit button actionlistener through some binding ?
    Thanks
    Suneesh

  • JDeveloper 10.1.3, TopLink and JDBC database

    I am new to both JDeveloper and TopLink, so please do not assume a great deal of knowledge on my part. I am reading documentation, but I'm not all the way through it yet, and I need to start making at least some progress on some projects. I am wanting to create an object model based on a database currently running on a FrontBase database platform. FrontBase implements SQL92. I have been able to create a connection to the database and when I test it, it succeeds. When I try to create a TopLink map from the "CreateJavaObjects from Tables" wizard, I first create a new TopLink map, selecting <Generic> as the Database Platform, and selecting the connection to the FrontBase database that I had created earlier. When I click OK in the dialog where I specify the parameters for creating the mapping file, there is a red circle with an X in it in the Database Platform item in the wizard. I'm not sure what this is telling me. Does this mean that I can't use TopLink with FrontBase at all? Or does it mean that the automatic creation of java object through this wizard can't be done? If I can't use the wizard, is there a manual or other alternate way of creating this map so that I could use the other features of TopLink at runtime?
    I am working on a Mac powerbook, using JDeveloper 10g (10.1.3) J2EE Edition. The version of FrontBase is 3.6.27 (which I realize is not the most current but it is what our servers are currently running).
    Many thanks for any insights into this issue. All the documentation is a bit overwhelming when you know as little as I currently do about these tools.
    Yours truly,
    Darlene

    I don't seem to be able to find anything that allows me to import the tables from the database if the platform chosen is "generic". I get a message that says that import is only allowed for databases compatible with Oracle 10g and would I like to change my project settings. Could you make your instructions a bit more specific?
    Thanks!
    Darlene

  • Multiple database users, ORM, entity framework, best practices

    Hello everyone!
    You've already helped me several times, however I must ask for an advice once more.
    I was assigned to develop .NET application with Data Access Layer and I've decided to use Oracle Database Software to provide sample data.
    As I'm absolute novice considering creating DAL I'd be grateful if you can examine my plan in terms of security and reliability:
    My database:
    1) I've created database with sample tables and relations between them. All tables belongs to databaseAdmin.
    2) I've created HR and Manager database users and granted them some privileges on certain databaseAdmin's tables. My intention is to reduce access to unnecessary tables. If my application user want to make some changes to Customers table it should be enough to connect to database as HR.
    And now I'd like to map my database using Entity Framework in my application. And that's where I have a problem:
    -If I create Entity Model basing on databaseAdmin tables I get perfect model, however every Entity SQL query would be executed on behalf of databaseAdmin, which breaks my idea of hiding unnecessary tables.
    -If I create Entity Model for HR and Manager users, my models could overlap on tables that both users have access to and no connection between tables would be generated (as from their point of view those tables are just some tables that belong to databaseAdmin)
    Could you help me with this deadlock? Or maybe my assumptions about multiple database users are incorrect? Please, bear in mind I'm a novice.
    I was trying to find a solution in web, and there're tons of data discussing technical aspects of Entity Framework etc., but not so many documents about conceptual model of database.

    hi Michael,
    Thanks for you posting!
    Sorry for I am not totally understanding your issue. Maybe two points need your confirm:
    1. I confuse with the "Service controller"? IS your meaning MVC controller? Or ServiceController(http://www.codeproject.com/Articles/31688/Using-the-ServiceController-in-C-to-stop-and-start
    2.whether  The type of ID in the model is match to the database ? In other words, Is the type of IDin .edmx matched to the database?
    By the way, it seems that this issue is more related to EF. You could post this issue on EF discussion for better support.
    Thanks & Regards,
    Will
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • ADF security and database

    Hi all,
    I am implementing ADF security on my application and I came across the following Documents:
    1- http://www.oracle.com/technology/products/jdev/howtos/1013/adfsecurity/adfsecurity_10132.html
    2-http://www.oracle.com/technology/products/jdev/howtos/1013/oc4jjaas/oc4j_jaas_login_module.htm
    and I have a few of questions :
    1- in ADF security, the edit authorization options in the PageDef reads the roles (gorups) stored on the system-jazn-data.xml file. If my roles are stored on the Database how can I read them?
    2- In the first document it is said " If the role name in web.xml matches a group name in system-jazn-data.xml, no further mapping is required. If the names do not match, then the web.xml role name needs to be mapped to the name in the system-jazn-data.xml using the orion-application.xml file. ". Can I do the mapping between the system-jazn-data.xml and the Database?
    3-When I assign ADF security permissions on PageDefs, It will be stored in the app-jazn-data.xml file. Can I store/read those permissions from the Database and no the app-jazn-data.xml file or at least can I do some kind of mapping between the Database and this file?
    thanks in advance,
    Ahmad Esbita

    Hi albertpi,
    Thanks for you response. This is our first ADF application.
    We are planning to impliment the security as mentioned above.
    We can configure the LDAP users in Weblogic server.
    We have a page with multiple tables which need to be shown based on the User roles.
    These roles we are planning to define in the table.
    1. I need to show list of users from my LDAP Users on the ADF UI to assign the roles.
    2. We will be defining our list of roles in a database table, which not sure whether they need to map to ADF application security roles.
    Data in table will be something like this.
    User Role
    Admin Tab1
    Admin Tab2
    Admin Tab3
    User1 Tab1
    User2 Tab2
    User2 Tab3
    Once the User is logged in we will read this table to show/hide the respective tabs.
    Can you tell us are we in right path, if yes How to achieve this.
    Thanks,
    Satya

  • Can I upload a simple iPhone App that all it does is direct the User to a Filemaker Pro URL   fmp://~filename.fmp?$VariableName=Value  This launches Filemaker Go and directs the user to the Database Hosted online   Right now there is no app store for

    Can I upload a simple iPhone App that all it does is direct the User to a Filemaker Pro URL   fmp://~filename.fmp?$VariableName=Value  This launches Filemaker Go and directs the user to the Database Hosted online
    Right now there is no app store for Filemaker Go.   Filemaker Forgot about us.
    So I want to create a simple native iPhone App that all it does
    is launch
    fmp://~/filename.fmp12?$VariableName=value
    This URL will launch the Filemaker Go App
    Filemaker Go is a app that the user will have to have
    downloaded already on the device..
    The Simple Native app will launch the Filemaker Go.
    The fmp  URL has the information where the Filemaker Pro database is hosted
    and get  the user where they need to be..
    Help Me please
    iPhone 5s, iOS 8.1.3

    That would be software. And, you said "upload." That's "uploading software." Why do you question what you stated?
    I don't know where you even want to upload this software. The only way it can be downloaded to a device is through the iTunes store. Do you even know what you want to do?

  • Grant privileges and permission to user, to create user and database in 10g

    Hi,
    I'm very much new to Oracle 10g database and after all my search, I think this forum will help me to solve my puzzle. Installed Oracle 10g database and during installation created a Global database "TestDB". I created an user "user1" in sqlplusw, by logging in as system.
    Now I need to know, what privileges and permissions should be given to this "user1", so that I can create new users and create database by logging as "user1". I don't want to Inherit all the sytem privileges of SYSTEM or SYSDBA or SYS or SYSOPER.
    Is there a way where I could achieve this by explicitly granting the required privileges and permissions

    You may need to know all the views to get the privilege information.
    SQL> conn /as sysdba
    SQL> select table_name from dict where table_name like '%PRIV%';
    And also, take a look into below Oracle Documentations.
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_9013.htm#SQLRF01603
    Regards,
    Sabdar Syed.

  • Different software and database user

    I want to install oracle software and oracle database on two difference user
    Software user: orasoft
    Primary group: oinstall
    Secondary group: dba
    User Home: /u01/orasoft
    $ORACLE_HOME=/u00/app/oracle/product/10.2.0
    /u00: owner: orasoft:oinstall permission 775 (before installing software)
    Database User: oradb
    Primary group: dba
    Secondary group: oinstall
    User Home: /u01/oradb
    In this scenario,
    Software is getting installed perfectly; I’m getting permissions issue for creating database
    1. Do I need to change the $ORACLE_HOME permissions to 775 after software installation for the database to get installed without any issue?
    2. if I do this, then the permission executables also gets changed to rwx-rwx-rx.

    Hi,
    First of all, I cannot really see the concept behind the user management how you have assigned orasoft and oradb users to oinstall and dba groups.
    Why cannot oinstall be the primary for both users and dba is the secondary? As well as what OS group do you plan to be the sysdba and sysoper groups?
    Second of all what do you mean by:
    user8209189 wrote:
    I want to install oracle software and oracle database on two difference userWhat kind of oracle software do you mean by the first oracle software ? What Oracle component are you refering here?
    As well as:
    user8209189 wrote:
    2. if I do this, then the permission executables also gets changed to rwx-rwx-rx.Be careful with playing with such permissions in the Oracle binary home as certain binary files require SUID settings (e.g. rwS)
    Regards,
    Jozsef

  • Adf bc and toplink

    Dear sirs.:
    My company will cange from forms to Jdev (adf), my question is:
    using only adf bc with jboss (for example) , can i do balancing to another jboss machine of some (heavy) objects, without using toplink ?
    I'm affraid off developing a 2 tier aplication with adf bc, and it becames heavy, how can i do balancing with no code changing, using only others aplication servers on the network?

    Can you tell us more about your expected client technology? Web application with JSF or desktop-fidelity client using ADF Swing?
    Can you clarify what you mean by "heavy objects" ?
    Are you asking whether applications built using ADFBC work well in an application cluster or server farm of multiple servers?
    Thanks for helping clear up these questions I have.

  • JDeveloper, Toplink, and ADF advice.

    We have application that was completely developed JDeveloper 10.1.3/4 with Toplink, JSF, ADF, and Session Facade; extremely similar to the SRDemo.
    I am want to upgrade to JDeveloper 11g; however, the ADF Faces JSF will be migrated to Apache MyFaces Trinidad.
    1. Why would this be better than migrating to ADF Faces 11g? Pros and cons?
    2. Is Apache MyFaces Trinidad the future of Oracle's ADF?
    3. What would be the best approach for upgrade to Toplink and ADF 11g?
    Thank you.

    1. Why would this be better than migrating to ADF Faces 11g? Pros and cons?It won't be better than using ADF Faces 11g - it is just more feasible for automatic conversion - we can't do automatic conversion from ADF FAces 10.1.3 to ADF Faces 11g since the UI capabilities are so drastically different. We migrate to Trinidad to allow you to combine Trinidad and ADF Faces 11g in the same application. (You can't use ADF Faces 10.1.3 and 11g in the same application).
    2. Is Apache MyFaces Trinidad the future of Oracle's ADF?No. ADF Faces Rich Client is the present and future. Those are based on Trinidad.
    3. What would be the best approach for upgrade to Toplink and ADF 11g?The basic thing to do is open the application in JDeveloper 11g - things should work after the migration.
    Then you can start leveraging new capabilities such as the new ADF Faces 11g UI in new parts of the application.
    You might want to ask on the TopLink forum if they have any specific migration tips.

  • 820e errors in user and message databases

    Have started geting these pretty frequently on both user and message databases. I am finding them in the POA logfile. When this happens user sometimes gets an 820 error message and email closes. I run gwocheck structure check and fix nightly, and content check and fix on weekends. We have very large post office w around 100 users. Size of user db doesn't matter, it has happened on large users and smaller as well. Have tried doing structural rebuilds on user db, but these messages still come back again.
    Help please!
    mary

    Originally Posted by mspencer
    Have started geting these pretty frequently on both user and message databases. I am finding them in the POA logfile. When this happens user sometimes gets an 820 error message and email closes. I run gwocheck structure check and fix nightly, and content check and fix on weekends. We have very large post office w around 100 users. Size of user db doesn't matter, it has happened on large users and smaller as well. Have tried doing structural rebuilds on user db, but these messages still come back again.
    Help please!
    mary
    Hi Mary,
    What kind of server is GroupWise running on (hardware, OS version, physical/virtual, etc)?.... could be the lock errors are caused due to the server not being able to handle requests quickly enough.
    Also what's the GroupWise version running on the server?
    -Willem

  • TopLink and ADF

    Hi,
    How well is TopLink integrated with the ADF architeture?
    Is there any sample application using ADF-Toplink? I know a simple workshop on ADF-Toplink was put on OTN this month. But the app is two simple (with one table - one class) and without search functionality.
    Any ADF-TopLink sample app (with search function) is appreciated.
    Thanks,
    Mingsheng

    i was looking for the same thing about 3 weeks ago.
    I found the best way to provide search facilities is with a named query.
    Here are some of the toplink tutorials i used.
    http://www.oracle.com/technology/obe/obe9051jdev/advancedtoplink/toplinkadvanced.htm
    http://download-west.oracle.com/otn_hosted_doc/toplink/1013/b13593/preface003.htm
    This one is very good:
    http://www.oracle.com/technology/obe/obe9051jdev/ide1012/adfworkshop/buildingadfapplicationsworkshop.htm

  • Difference Between Database Schema and Database User Account ??

    First i would like to know what an Oracle Database schema exactly is ?
    And what is it for and also What is it's use ?
    Later the exact "Difference Between Database Schema and Database User Account".
    I googled about it but i'm unable to find out it's The difference,
    Please try to explain in a simple manner........
    Thank you very Much in Advance..........

    user13655582 wrote:
    Greate example. but i would like add one more point..
    a user is a schema and schema is a user. but when this applies to the user that he become a schema, only if he has got some objects. so we can say while creating the user which dosent contain any objects called simple user account but afterwords when he has got an objects then we can say its a schema as the above user has shown you through the exampleIt is just word-play. There is nothing in like a 'status' indicator to say "USER_A is just a user but USER_B has become a schema". Many people use the terms "user" and "schema" interchangeably, and some very good DBAs will insist this is correct. I don't disagree with them even though I usually try to make the distinction.
    In a typical application, all of the objects (tables, procedures, etc) that implement the app will be owned by a "application schema owner" - a user which exists for the sole purpose of owning the schema. Said user will have no privileges at all .. especially not CREATE SESSION. Except for possible maintenance activity no one ever actually connects as this user. User accounts are then given to actual humans who connect with their own accounts. The accounts have the necessary system and object privileges granted to them - via a role. One could also create a special account (let's call it APP_ADMIN) that is used for maintenance and batch operations within the application.

  • Same user in tacacs and local database with different privilege

    Hi there,
    i am just not sure if this is correct behavior.
    i am running NX-OS image n5000-uk9.5.1.3.N1.1.bin on the nexus 5020 platform.
    i have configured authorization with tacacs+ on ACS server version 5.2 with fall back to switch local database.
    aaa authentication login default group ACS
    aaa authorization commands default group ACS local
    aaa accounting default group ACS
    a user test with priv 15 is craeted on ACS server, password test2
    everything works fine, until i create the same username on the local database with privilege 0. ( it doesnt matter if the user in local database was created before user in ACS or after )
    e.g.:  
    username test password test1 role priv-0   (note passwords are different for users in both databases)
    after i create the same user in local database with privilege 0,
    if i try to connect to the switch with this username test and password defined on ACS,  i get only privilege 0 authorization, regardless, that ACS server is up and it should be primary way to authenticate and authorizate the user.
    is this normal?
    thank you for help...

    Hello.
    Privileges are used with traditional IOS. Privileges are part of "command authorization". Other operating systems (like IOS-XR, Nexus OS , Juniper JunOS) use "role-based authorization" instead of "command authorization".
    So traditional IOS can use the "privilege" attribute but other operating systems can not.
    Although IOS-XR, Nexus, ACE, Juniper  have "roled-based authorization" feature, every single one of them use their particular attributes.
    When I was configuring TACACS with ACE, Juniper and other devices I had to capture the packets to find out what were the particular attributes of ACE, what were the particular attributes of JunOS, etc, etc and to search deeply some hints the documentation , because sadly  documentation is not very good when talking about TACACS details.
    If you find which attributes to use, and what values to assign to the attributes then you can go to ACS and configure a "Shell Profile".
    Now back to Nexus 5000. It seems this particular device has the option to mix "role-based" with "command authorization" by overriding the default roles with other roles which names are called "priv". It seems this was an effort to try to map the old concept of "privileges" to the new concept of "roles". Although you see the word "priv", it's just the name of the role. My particular point of view is that this complicates the whole thing. I would recommend to use just the default roles, or customize some of them (only if needed), but not to use "command authorization".
    http://www.cisco.com/en/US/docs/switches/datacenter/nexus5000/sw/security/502_n1_1/Cisco_n5k_security_config_gd_rel_502_n1_1_chapter5.html
    I will search the particular attributes Nexus use to talk to TACACS server. If I got them I will post them here.
    Please rate if it helps

  • Confussing between Database User and Application User in Discoverer

    Hi All,
    I am new to Discoverer.
    Please let me know the difference between Database User and Application User in Discoverer Administrator as well as in Discoverer Desktop Editions.
    1) While I am trying to connect to Discoverer Desktop, I am unable to connect to it with Apps Database User.
    2) Where the Discoverer compenent will be installed and what the configuration settings need to done work on it.
    Please let me know the answers soon.
    Thanks in Advance.

    Hello
    I think a database user should pretty much be self explanatory - this is a user account that exists in the database. This account is created by your Database Administrator (DBA).
    The second kind of user that Discoverer understands is a user that exists inside Oracle E-Business Suite (EBS), formerly known as Oracle Applications, hence an application user. This user account gets created by the EBS system administrator.
    Now, just because you're using EBS, it does not automatically follow that users will be application users. Let me explain.
    Discoverer can be installed in one of two modes, standard mode and Applications mode.
    The vast majority of organizations use standard mode which means they allow database users to access the system.
    The only time that you will need an applications account is under the following two rules:
    1. Your organization is using E-Business Suite, AND
    2. Your Discoverer administrator has installed Discoverer in Applications mode.
    Applicatons mode does not happen automatically, even if you have EBS, and you cannot install that mode by accident. You have to tell Discoverer that it is operating in that mode, provide some additional EBS account information, make security assignments and set users have to deliberately tell Discoverer they want to connect using an applications account.
    May I suggest you get hold of a copy of the Oracle Discoverer 10g Handbook that I wrote. That book explains in detail the differences between the modes. I also have a free white paper on my website that describes how to install Discoverer into Applications mode.
    I hope this helps
    Best wishes
    Michael
    http://ascbi.com

Maybe you are looking for