Database Entity Manager Concept

Hello Forte-Users,
currently I work with the Concept of the White-Paper:
Forte Database Integration Patterns
Forte Consulting
May 1996
to integrate Database-Access into my Warehouse-Application.
Because the hole Application is delivered step by step and we are new
in using Forte, I use for the first step only the patterns described for
the DBEntityMgr to get a "feeling".
The problem is, that if I use the DBEntityMgr-Concept and have many
BaseClasses to access I have a lot of interface-calls like
GetCustomer,GetProducts,etc..
The Database Session Router will also not solve this "problem" in future,
because the
ApplicationEntityMgr has than the same problem.
Question: Know anyone a way, based on the upon described facilities to use
this strategy with a solution to make more "EntityMgrSO's" to get a smaller
DBEntityMgr-Interface?
The Database Session Router is planed for using when the Application should
be used from more Users and when running the SO's on a WorkGroup-Server.
Question: Know anyone a way there to split the ApplicationEntityMgr?
Every reply is welcome.
Thanks forward to all
Joseph Mirwald
Bachmeier & Sporrer
GERMANY
EMAIL: [email protected]
Don't worry, which bug you wanna have today?

...snip
>> The bad part is that now, the "client" of the entity manager
must know
>> which entity manger to call for any particular set of
data. This negates
>> a significant part of the advantage of using the single
interface into the
>> persistence layer.
snip ...
[KUBASADA Manjunatha] We can avoid this problem by having the
EntityMgrSO method determine which entity manager to use. The client can
pass a parameter indicating which object to get. The client call would
look like,
myobject = EntityMgrSO.GetEntity(myobjectindicator);
OR
EnitytMgrSO.GetEntity(output myobj : object);
In the second case, the GetEntity method uses the run time type
of myobj to determine which entity manager to call. In both cases the
EntityMgrSO returns an object of type Object; the client would have to
cast it to the appropriate type.
Don, are there any downsides to this approach ?
Manjunatha Kubasada
Complete Business Solutions Inc.
email : [email protected]
Ph : (248) 488-2088 X 3480
-----Original Message-----
From: Don Nelson [SMTP:[email protected]]
Sent: Saturday, November 29, 1997 4:05 PM
To: Joseph Mirwald
Cc: forte-users
Subject: Re: Database Entity Manager Concept
Joeseph,
The concept of the entity manager having less interfaces is both good
and
bad. The good part is mostly related to development - splitting up
the
calls to the various SQL managers among several entity managers allows
more
flexibility in terms of which classes have to be checked out of the
repository to add to or update the interfaces.
>> The bad part is that now, the "client" of the entity manager
must know
>> which entity manger to call for any particular set of
data. This negates
>> a significant part of the advantage of using the single
interface into the
>> persistence layer.
I've used both strategies in the past, and I tend to stay with one
entity
manager with a large number of interfaces. It moves the
responsibility of
knowing where to get the data from the client to the service, where it
usually belongs. The only real time penalty is when you compile the
partition - there will be more to compile. But since they are just
interafaces, it shouldn't be that big of a deal.
Don
At 10:49 AM 11/28/97 -0500, Joseph Mirwald wrote:
Hello Forte-Users,
currently I work with the Concept of the White-Paper:
Forte Database Integration Patterns
Forte Consulting
May 1996
to integrate Database-Access into my Warehouse-Application.
Because the hole Application is delivered step by step and we are new
in using Forte, I use for the first step only the patterns describedfor
the DBEntityMgr to get a "feeling".
The problem is, that if I use the DBEntityMgr-Concept and have many
BaseClasses to access I have a lot of interface-calls like
GetCustomer,GetProducts,etc..
The Database Session Router will also not solve this "problem" infuture,
because the
ApplicationEntityMgr has than the same problem.
Question: Know anyone a way, based on the upon described facilitiesto use
this strategy with a solution to make more "EntityMgrSO's" to get asmaller
DBEntityMgr-Interface?
The Database Session Router is planed for using when the Applicationshould
be used from more Users and when running the SO's on aWorkGroup-Server.
Question: Know anyone a way there to split the ApplicationEntityMgr?
Every reply is welcome.
Thanks forward to all
Joseph Mirwald
Bachmeier & Sporrer
GERMANY
EMAIL: [email protected]
Don't worry, which bug you wanna have today?
============================================
Don Nelson
Regional Consulting Manager - Rocky Mountain Region
Forte Software, Inc.
Denver, CO
Corporate voice mail: 510-986-3810
aka: [email protected]
============================================
"The good thing about drawing a tiger is that it automatically makes
your
picture fine art." - Hobbes

Similar Messages

  • Entity Manager in EJB3

    Could someone explain the concept of
    1. Entity manager.
    2. Types and Purpose of Entity manager
    3. How they are injected
    Thanks in advance.

    A start to covering these questions here:
    http://en.wikibooks.org/wiki/Java_Persistence/Runtime
    For the meaning of life go here:
    http://en.wikipedia.org/wiki/Meaning_of_life
    -- James : http://www.eclipselink.org

  • How to inherit one enity method and to create entity manager factory

    Hi All,
    i have totally 5 databases where one database has the connection details of all other 4 databases.i am using EJB 3.0 and using MVC architecture.is there any possibility to get the details in that datbase and create entity manager factory based on that detail.i defined all the database connection in persistence.xml.

    Hi,
    is there any oher possibility to create entity manager factory dynamically?

  • Can I create two entity manager factoris in one app?

    I need to develop two projects, both need JPA access to same data source.
    One is an web project, the other is java se project. And web project needs to the some methods inside java se project.
    I created two separate JPA set(persistence.xml and entity classes). Both project can run separately however, if I call the methods inside java se project from the web project.
    entity manager inside that project won't be created successfully, says error:
    oracle.toplink.essentials.exceptions.DatabaseException Internal Exception: java.sql.SQLException: No suitable driver found
    I am very confident that mysql driver lib has been added for both projects.
    Does anyone know what is wrong here? Thanks!

    Yes. Reduce the number of FDM applications you are creating. You can have multiple target system adapters in a single FDM application (i.e. a single database only required). There is no need to create a new application for each target system.

  • OIM 9.1.0 with Database User Management: Connector Exception upon Connect

    Hi,
    I've been struggling with the Database User Management connector (9.0.4) with Sybase, following the steps word-for-word as per the documentation (Oracle® Identity Manager Connector Guide for Database User Manage Release 9.0.4; E10425-0; July 2009).
    When defining the IT Resource through the Install Connector wizard, I get the following when it does a connection test:
    14:51:52,795 ERROR [WEBAPP] Class/Method: CreateITResourceAction/testConnectivityForDataBase/ClassNotFoundException encounter some problems: No ClassLoaders found for: com.sybase.jdbc2.jdbc.SybDriver
    java.lang.ClassNotFoundException: No ClassLoaders found for: com.sybase.jdbc2.jdbc.SybDriver
    even though I've ensured jconn2.jar is in the ThirdParty directory, reflushed the cache, and restarted OIM; the connector still can't seem to load the driver.
    I've tried the database testing script with similar results.
    Any thoughts?
    Cheers
    Simon
    PS: I believe v5.5 of JConnect (as required by the OIM Connector) has been EOL'd and Sybase. They recommend you use v6.0 (v6 is jconn3.jar)), which from what I can see should work as com.sybase.jdbc3.jdbc.SybDriver; I tried that as well but had the same ClassNotFoundException.

    I've fixed it; needed to copy jconn2.jar into the $JBOSS_HOME/lib directory and restart the server.

  • Problem with non-container managed entity manager

    i am working on a project, in which i am using entity beans.i use netbeans, glassfish as application server and toplink as persistence provider .
    i created a java class that handles all the operations with the entitys, which means i using non-container managed entity manager.
    in the constructor
    try{
                EntityManagerFactory emf = Persistence.createEntityManagerFactory("voidPU");
                entityManager = emf.createEntityManager();
            catch(Exception ex){
                throw new EJBException(ex.getMessage());
            }then i call a function in this class from a servlet
    the code of the function
    List users = null;
            try {
                ProgLanguages progLanguage = entityManager.find(ProgLanguages.class, languageId);
                users = (List) progLanguage.getUserIdCollection();
            catch(IllegalStateException illegalStateException){
                throw new EJBException(illegalStateException.getMessage());
            catch(IllegalArgumentException illegalArgumentException) {
                throw new EJBException(illegalArgumentException.getMessage());
            }i got an IllegalArgumentException saying Unknown entity bean class: class vanguard.server.entity.ProgLanguages, please verify that this class has been marked with the @Entity annotation
    what confuses me is that sometimes it works and most of the time it does not work, have i made anything wrong?, or there is a problem with any of the tools netbeans, glassfish, or toplink?

    Is it always the same entity that is reported as 'unknown' ? You mention that it works sometimes but is it the same deployment and the same code that works? The first thing I would verify is that the ear is being created as expected by netbeans. Check the persistence.xml file and verify that all of the classes are listed that will be used as entities.
    --Gordon                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to use application managed entity manager in EJB?

    I finish reading The EntityManager Interface in JEE tutorial.
    I know I can use container manager entity manager in EJB, but I want to explore how to use application managed entity manager in EJB.
    Can I use application managed entity manager in EJB (container management JTA transaction is used)? Where do I should close entity manager if can?
    The following is an example from JEE tutorial, but didn't find where to calose entity manager. and can I create mutiple EntityManagerFactory objects and Entity Manager objects to use them in a JTA transaction?
    @PersistenceUnit
    EntityManagerFactory emf;
    EntityManager em;
    @Resource
    UserTransaction utx;
    em = emf.createEntityManager();
    try {
      utx.begin();
      em.persist(SomeEntity);
      em.merge(AnotherEntity);
      em.remove(ThirdEntity);
      utx.commit();
    } catch (Exception e) {
      utx.rollback();

    Seems like a very poor example, the whole power of EJBs is to use Container Managed Transactions so you don't NEED to manage the transaction and the entity manager yourself. What you posted is code I would expect in a non-JEE application, or in a piece of code which requires fine-tuned transaction boundaries such as batched data importing logic.
    If I were you I'd research JPA in steps.
    a) learn about JPA as an API outside of the scope of EJBs (recommended reading: the book 'Pro JPA 2')
    b) learn about Container Managed Transactions in EJBs
    c) learn about Bean Managed Transactions in EJBs
    Right now you're rushing into c). I can understand that it raises many question marks at this point.

  • Database User Management Connector ,

    Hi,
    Want some help in understanding the database user management connector to achieve the Requirement -
    " Need to do user provisioning to a database according to roles/entitlements assigned to a user and also wants that access to that database is managed according to roles assigned to that users "
    My environment is OIM 11g R2 which is integradted with OIA 11.1.1.5.0
    Googled and found that Database User mangement Connector is required for his purpose.Please confirm is this understanding correct or is there any better approach.
    Also want to know is it mandatory to install bundle on ICF for this connector?
    Thanks,
    Puneet
    Edited by: Puneet Lobana on May 23, 2013 11:55 PM

    Hi one more silly doubt.....can i connect to oracle database without using a connector but creating an IT Resource Type, IT Resource, RO,PD - adapters using stored procedure task to call a stored procedure on the target database?
    Pls help
    Regards,
    sk
    Edited by: sk on 19/08/2010 22:15

  • DATABASE RESOURCE MANAGER ( ORACLE 8I NEW FEATURE )

    제품 : ORACLE SERVER
    작성날짜 : 2004-08-16
    DATABASE RESOURCE MANAGER ( ORACLE 8I NEW FEATURE )
    ===================================================
    SCOPE
    8i~10g Standard Edition 에서는 Database Resource Manager 를 지원하지 않는다.
    Explanation
    Database Resource Manager란 OS에서 제공하는 자원 (예 : CPU 자원 )에 대해 DB
    차원에서 계획을 세워, 세부 관리를 할 수 있도록 해 주는 서비스이다.
    예를 들어 주간에 batch 작업을 처리하더라도, OLTP 업무에는 지장을 주지 않아야
    할 경우 batch 작업에 CPU 자원을 적게 할당해 주는 것이 바람직 하며, Resource
    Manager를 활용하여 CPU 자원을 batch 작업과 OLTP 업무에 서로 다르게 할당해 줄
    수 있다. ( Oracle 8.1.6 까지는 Resouurce Manager에서 CPU 자원에 대해서만
    관리만 가능하다 )
    1. 용어
    1) Resource Consumer Group
    사용자 session들의 집합. Resource에 대한 요구사항에 따라 나뉘어진 그룹.
    2) Resource Plan
         Consumer Group에 자원을 할당 해 주기 위한 resource plan directive들을
    포함.
    3) Resource Allocation Method
         Resource Manager에서 자원을 할당해 주는 방법/정책.
    4) Resource Plan Directive
         Resource Plan에 대해 자원을 할당해 주는 세부 내역.
    2. Resource Consumer Group
    * 기본 group
         [ 사용자가 삭제, 수정할 수 없는 group ]
         OTHER_GROUPS : active plan schema에 속하지 않는 consumer group의 모든
    session
         DEFAULT_CONSUMER_GROUP : consumer group을 지정하지 않은 모든
    session.(default)
         [ 기본적으로 제공되나 사용자가 삭제하거나 변경할 수 있는 group ]
         SYS_GROUP : SYSTEM_PLAN에 대한 high priority consumer group
    SYSTEM, SYS user에 할당한다.
         LOW_GROUP : SYSTEM_PLAN에 대한 low priority consumer group
    3. Resource Plan
         Consumer group에 속하는 session들은 해당 group에 대한 resource plan에
    따라 자원 할당이 결정되며, 자원 할당에 대한 세부 사항은 resource plan에
    대한 resource plan directive에서 지정된다.
         Resource plan은 subplan을 둘 수 있다.
    4. Resource Allocation Method
         Round-robin Method : Consumer group 내에서 session들에 대한 CPU 할당
         Emphasis Method : Consumer group에 할당되는 CPU
         Absolute Method : Parallel degree 한계 ( 예 : Parallel Query에서의
    degree )
    5. Resource Plan Directive
         Resource Plan Directive에 지정된 내용들은 resource plan에 따라
    consumer group에 자원을 할당할 때 반영된다.
    6. 구현 예제
         MYDB PLAN +-> MAILDB PLAN +-> POSTMAN GROUP (40% Level 1)
         | (30% Level 1) |
         | +-> USERS GROUP (80% Level 2)
         | |
         | +-> MAILMAINT GROUP (20% Level 2)
         | |
         | +-> OTHER GROUP (100% Level 3)
         |
         +-> BUGDB PLAN  +-> ONLINE GROUP (80% Level 1)
         (70% Level 1) |
         +-> BATCH GROUP (20% Level 1)
         |
         +-> BUGMAINT GROUP (100% Level 2)
         |
         +-> OTHER GROUP (100% Level 3)
         위 예에서 MYDB PLAN에는 2개의 subplan ( MAILDB PLAN, BUGDB PLAN )이
         있으며 각각 30%와 70%의 CPU 자원을 할당하였다.
         Level 1, Level 2, Level 3 는 우선순위 레벨을 의미하며, 하나의
         resource plan에서 동일한 level의 합이 100%를 넘지 못한다.
         ( Level 은 1부터 8까지 지정할 수 있으며 level 1이 가장 우선순위가
         높으며 level 8이 가장 우선순위가 낮다 )
         예를 들어 전체 CPU 자원의 70%를 할당 받은 BUGDB PLAN은 다시
         ONLINE GROUP과 BATCH GROUP을 두고 있는데, 이 둘의 Level이 모두 1이며
         두개의 percentage의 합이 100%이다. 하지만, 즉, level 1인 ONLINE GROUP
    에 90%를 할당하였다면, level 1인 BATCH GROUP에는 10% 이상을 할당할 수
    없다.
    Example
         * 구현을 위한 코드
         BEGIN
         /* PLAN schema 작업 영역 생성 */
         DBMS_RESOURCE_MANAGER.CREATE_PENDING_AREA();
         /* BUGDB PLAN, MAILDB PLAN, MYDB PLAN 생성 */
         DBMS_RESOURCE_MANAGER.CREATE_PLAN(PLAN => 'bugdb_plan',
         COMMENT => 'Resource plan/method for bug users sessions');
         DBMS_RESOURCE_MANAGER.CREATE_PLAN(PLAN => 'maildb_plan',
         COMMENT => 'Resource plan/method for mail users sessions');
         DBMS_RESOURCE_MANAGER.CREATE_PLAN(PLAN => 'mydb_plan',
         COMMENT => 'Resource plan/method for bug and mail users sessions');
         /* CONSUMER GROUP 생성 */
         DBMS_RESOURCE_MANAGER.CREATE_CONSUMER_GROUP(CONSUMER_GROUP =>
    'Bug_Online_group', COMMENT => 'Resource consumer group/method for
    online bug users sessions');
         DBMS_RESOURCE_MANAGER.CREATE_CONSUMER_GROUP(CONSUMER_GROUP =>
    'Bug_Batch_group', COMMENT => 'Resource consumer group/method for
    bug users sessions who run batch jobs');
         DBMS_RESOURCE_MANAGER.CREATE_CONSUMER_GROUP(CONSUMER_GROUP =>
    'Bug_Maintenance_group', COMMENT => 'Resource consumer group/method
    for users sessions who maintain the bug db');
         DBMS_RESOURCE_MANAGER.CREATE_CONSUMER_GROUP(CONSUMER_GROUP =>
    'Mail_users_group', COMMENT => 'Resource consumer group/method for
    mail users sessions');
         DBMS_RESOURCE_MANAGER.CREATE_CONSUMER_GROUP(CONSUMER_GROUP =>
    'Mail_Postman_group', COMMENT => 'Resource consumer group/method for
    mail postman');
         DBMS_RESOURCE_MANAGER.CREATE_CONSUMER_GROUP(CONSUMER_GROUP =>
    'Mail_Maintenance_group', COMMENT => 'Resource consumer group/method
    for users sessions who maintain the mail db');
         /* BUGDB PLAN에 대한 DIRECTIVE 생성 */     
         DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE(PLAN => 'bugdb_plan',
    GROUP_OR_SUBPLAN => 'Bug_Online_group',     COMMENT => 'online bug users
    sessions at level 1', CPU_P1 => 80, CPU_P2=> 0,
         PARALLEL_DEGREE_LIMIT_P1 => 8);
         DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE(PLAN => 'bugdb_plan',
    GROUP_OR_SUBPLAN => 'Bug_Batch_group',      COMMENT => 'batch bug users
    sessions at level 1', CPU_P1 => 20, CPU_P2 => 0,
         PARALLEL_DEGREE_LIMIT_P1 => 2);
         DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE(PLAN => 'bugdb_plan',
    GROUP_OR_SUBPLAN => 'Bug_Maintenance_group',COMMENT => 'bug
    maintenance users sessions at level 2', CPU_P1 => 0, CPU_P2 => 100,
         PARALLEL_DEGREE_LIMIT_P1 => 3);
         DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE(PLAN => 'bugdb_plan',
    GROUP_OR_SUBPLAN => 'OTHER_GROUPS', COMMENT => 'all other users
    sessions at level 3', CPU_P1 => 0, CPU_P2 => 0, CPU_P3 =>
         100);
    (참고) CPU_P1 : cpu allocation for level 1
         /* MAILDB PLAN에 대한 DIRECTIVE 생성 */
         DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE(PLAN => 'maildb_plan',
    GROUP_OR_SUBPLAN => 'Mail_Postman_group',COMMENT => 'mail postman at
    level 1', CPU_P1 => 40, CPU_P2 => 0, PARALLEL_DEGREE_LIMIT_P1 => 4);
         DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE(PLAN => 'maildb_plan',
    GROUP_OR_SUBPLAN => 'Mail_users_group',     COMMENT => 'mail users
    sessions at level 2', CPU_P1 => 0, CPU_P2 => 80,
         PARALLEL_DEGREE_LIMIT_P1 => 4);
         DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE(PLAN => 'maildb_plan',
    GROUP_OR_SUBPLAN => 'Mail_Maintenance_group',COMMENT => 'mail
    maintenance users sessions at level 2', CPU_P1 => 0, CPU_P2 => 20,
         PARALLEL_DEGREE_LIMIT_P1 => 2);
         DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE(PLAN => 'maildb_plan',
    GROUP_OR_SUBPLAN => 'OTHER_GROUPS', COMMENT => 'all other users
    sessions at level 3', CPU_P1 => 0, CPU_P2 => 0, CPU_P3 =>
         100);
         /* MYDB PLAN에 대한 DIRECTIVE 생성 */
         DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE(PLAN => 'mydb_plan',
    GROUP_OR_SUBPLAN => 'maildb_plan', COMMENT=> 'all mail users
    sessions at level 1', CPU_P1 => 30);
         DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE(PLAN => 'mydb_plan',
    GROUP_OR_SUBPLAN => 'bugdb_plan', COMMENT => 'all bug users sessions
    at level 1', CPU_P1 => 70);
         /* PLAN schema 작업 내용을 저장 */
         DBMS_RESOURCE_MANAGER.VALIDATE_PENDING_AREA();
         DBMS_RESOURCE_MANAGER.SUBMIT_PENDING_AREA();
         end;
    7. CONSUMER GROUP에 사용자나 세션을 할당하는 방법
         먼저 인스턴스에서 사용할 TOP Level resource plan 을 지정한다.
    initSID.ora에 RESOURCE_MANAGER_PLAN = MRDB_PLAN 지정이나 아래와 같이
    session level에 ALTER SYSTEM command를 사용하여 지정한다.
         ALTER SYSTEM SET RESOURCE_MANAGER_PLAN = MYDB_PLAN;
         그리고 SCOTT 계정에 BUG_ONLINE_GROUP과 BUB_BATCH_GROUP 에 속할 수 있는
    권한을 부여     
    DBMS_RESOURCE_MANAGER_PRIVS.GRANT_SWITCH_CONSUMER_GROUP ('SCOTT',
    'BUG_ONLINE_GROUP', TRUE);
         DBMS_RESOURCE_MANAGER_PRIVS.GRANT_SWITCH_CONSUMER_GROUP ('SCOTT',
    'BUG_BATCH_GROUP', TRUE);
         * DBMS_RESOURCE_MANAGER.SET_INITIAL_CONSUMER_GROUP( user in
    varchar2, consumer_group in varchar2);
         예)
         DBMS_RESOURCE_MANAGER.SET_INITIAL_CONSUMER_GROUP('SCOTT',
    'BUG_ONLINE_GROUP');
         SCOTT 계정을 BUG_BATCH_GROUP에 할당
         * DBMS_RESOURCE_MANAGER.SWITCH_CONSUMER_GROUP_FOR_SESS (
                             session_id IN NUMBER,
                             session_serial IN NUMBER,
                             consumer_group IN VARCHAR2);
         예)
         DBMS_RESOURCE_MANAGER.SWITCH_CONSUMER_GROUP_FOR_SESS( 11, 2,
    'BUG_ONLINE_GROUP');
         * DBMS_RESOURCE_MANAGER.SWITCH_CONSUMER_GROUP_FOR_USER (
                             user IN VARCHAR2,
                             consumer_group IN VARCHAR2);
         예)
         DBMS_RESOURCE_MANAGER.SWITCH_CONSUMER_GROUP_FOR_USER('SCOTT',
    'BUG_BATCH_GROUP');
    8. 관련된 Dictionary
    DBA_RSRC_PLANS : Resource plan과 status
    DBA_RSRC_PLAN_DIRECTIVES : Resource plan directives와 status
    DBA_RSRC_CONSUMER_GROUPS : Consumer group과 status
    DBA_RSRC_CONSUMER_GROUP_PRIVS : 사용자에게 부여된 Consumer group
    DBA_USERS : INITIAL_RSRC_CONSUMER_GROUP라는 새로운 column이 추가
    V$SESSION : RESOURCE_CONSUMER_GROUP라는 새로운 column이 추가
    V$RSRC_PLAN : 새로운 view로 active resource plan을 보여준다
    V$RSRC_CONSUMER_GROUP : 새로운 view로 consumer group의 active session
    을 보여준다.
    Reference Ducumment
    ---------------------

    user1 is the schema present in DB1
    user2 is the schema present in DB2. I just have a DB link
    as below:
    create database link link_to_DB2 connect to user2 identified by user2 using 'DB2';---Connects from user1 of DB1 to user2 of DB2.
    Requirement is as below:
    CPU for DB2 - 25%
    Out of above 25%, CPU for user2 - 70%
    CPU for user1 30% -- whenever it conncts using the link)
    Please help me out.

  • Topic: How to obtain entity manager in application server?

    Hey,
    How to obtain Entity manger in application server ?
    The class is a simple class (no Ejb), and i can call to this class from Ejb or from inner schdeuler process (not container management)
    I want that if i call to this calss from Ejb , that the entity manager transaction will join to the global transaction.
    Thank you

    Hi,
    entity managers outside EJBs can be created using a javax.persistence.EntityManagerFactory.
    Regards

  • Set SSIS variable = database connection manager name

    Is it possible to set a SSIS string to only the name of a database connection manager or even the connection string it uses ? I don't see an option for that in Evaluate as expression property of ssis variable.
    This is what I mean - 
    SSIS Connection manager name = SQL_DBASE
    SSIS String str_managerName = SSIS Connection manager name: Can you do this dynamically in SSIS ?

    I'm guessing what they really want to do is evaluate some indicator (some input from a user or an infrastructure setting) and then dynamically connect to any one of 10 (arbitrary example) database servers based on what they get as input.  They
    don't care about the connection manager per se.  What seems reasonable is the that the Connection Manager might take a server variable but if they wanted to do things like that they would have bought Datastage.
    You might try attacking this problem at the Control Level and then connect to the database you want based on a variable you set.   I'm seeing that a Sequence Container can branch on the contents of a variable. 
    Or if the dba is your friend you might get the dba to add all your servers as linked servers to a central connection machine and then you might be able to do this by putting the ssis variable in a "Sql Command from a Variable" variable. 
    It might look something like this:
    Server is designated in ssis var @[User::Machine]
    then executing from a variable
    "select top 100 * from " + @[User::Machine] + ".mydb.dbo.mytable"
    Be careful as hades about levels of indirection and what quotes you want at what level.  Evaluate Expression in ssis helps with this.  The syntax I show works only with an ms sql connection server to a remote ms sql server.  This is what a
    dynamic connection to a linked server connection to Oracle would look like:
    "select * from
    openquery("+ @[User::Machine] + ",'select * from oradb.oratable where rownum < 100')"
    When ever a thousand of your best friends are helping you connect to your database (using tools like linked servers as opposed to direct connections) it's probably best to use with only small specific updates or queries, large queries or large
    updates would probably take a long time and or might not finish.  But try it before you give up.   We are actually doing fairly large Oracle queries (5-10 million rows) through ms sql linked server.

  • Entity manager Slow down

    Hey all Well I was just wonder if you guys could give me some insight? I am using the entity manager and It seems like I can do a transaction.. But as I keep doing the transaction to add elements.. It runs fine but then all of a sudden it just hangs? here my code? any insight would be greatly appreciated.. even if its just a theory
    selectedCustomer.getLevelIdSellCollection().add(item);               
    EntityTransaction tx = getEntityManager().getTransaction();
                    tx.begin();
                    getEntityManager().merge(Customer);
                    tx.commit();
                    getEntityManager().refresh(Customer);
                                   Message was edited by:
    jbayuga
    Message was edited by:
    jbayuga

    Welcome to the forum.
    If you have created either a Roll, or Crawl, with the Animation Preset, then you will want to increase the Duration of that Title, to slow it down. You can do this by click+dragging on the Tail of the Title.
    Or, you can create a static Title, then animate it by Keyframing the Fixed Effect>Motion>Position over time. That allows for much more control.
    Good luck,
    Hunt

  • Recommended way of getting entity manager from pojo class

    Hi,
    In our application we have the need or retrieving entity manager from 'pojo' classes.
    More specifically we have singleton classes which act as 'data' repositories and are accessed from both servlets and ejb.
    I'm aware that the repositories classes might be problematic, but in the current stage we can't perform significant change in application structure so I am looking for a 'fast' solution as possible.
    The best way will be to lookup entityt manager in JNDI, but as I undestand this feature is not avaialabe in weblogic.
    I understand that the preffered way for getting entity manager in such situation is by using @PersistenceUnit annotion on the calling location and lookup entityManager by that name in the pojo. This is however problematic for us since since we access the repositories from variouse locations (many different classes).
    Possible additional solutions we thought of:
    - creating an 'entity manager factory' locator ejb. This is an ejb with no transaction attribute, which has one method getEntityManagerFactory. It injects entityManagerFactory and returns it. This is the fastest soltion to implement. Is this a valid one?
    - using application managed entity manager in such situations. We have a problem doing so now because the creation seems to fail for variouse reasons.
    What is the recommended way?
    Thanks.

    To obtain an EntityManager instance, first must obtain an EntityManagerFactory instance by injecting it into the application component by means of the javax.persistence.PersistenceUnit annotation:
    @PersistenceUnit
    EntityManagerFactory emf;
    Then, obtain an EntityManager from the EntityManagerFactory instance:
    EntityManager em = emf.createEntityManager();
    http://download.oracle.com/javaee/5/tutorial/doc/bnbqw.html
    Edited by: dvohra16 on Apr 14, 2011 5:06 PM

  • Database session management in APEX

    How is the database session managed in APEX? I found that sometimes a database session can last from page to pages in an APEX application, but sometimes every page starts a new database session.
    Is there a way to control the database session in APEX?
    Thanks,
    -Fengting

    Since HTTP is a stateless and connectionless protocol, you are not guaranteed to get the same database session between pages. APEX maintains the session state implicitly. Each session is assigned a unique identifier with APEX. The APEX engine uses the session ID to store and retrieve the applications working set of data or session state before and after each page view.
    The session information persists in the database until purged. Therefore, as long as the client's session cookie has not expired, a user can continue running the application long after having first launched it. This is also what allows a user to run multiple instances of an application simultaneously in different browser sessions.
    That being said, I think the answer to your question is that it is not necessarily going to be the same database session (but could be), nor can you control it. You should use session state.

  • Database transaction management in Web services

    Hi,
    I am using Oracle8i and firing some database queries from my web services. I want to do the transaction management for the same i.e. When one of the queries fail, i want to rollback. But when i write my own transaction management, it gives me an error :
    java.sql.SQLException: Cannot call Connection.commit in distributed transaction.Transaction Manager will commit the resource manager when the distributed transaction is committed.
    Can anyone please help me out as to how to perform the database transaction management in web services.
    Thanking in advance.
    Prashant

    Unfortunately to manage transactions over web services there is no viable solution available in market. All implementations come with restrictions e.g. Metro works with only EJBs on Glassfish, JBossTS works on JBoss but not with JAX-WS, Atomikos supports only Axis as of now.
    1. See explanation above.
    2. Yes, it can be but conditions mentioned above are applied :-)
    3. [www.oasis-open.org/committees/ws-tx/|www.oasis-open.org/committees/ws-tx/]
    4. Unfortunately as of now I do not see an easy way to this problem.

Maybe you are looking for