Design question related to database replication ...

Hi everybody,
I had a design and architecture question. Do you folks mind giving me some directions on it please ?
We have a huge J2EE application coming in related Airlines business. It will run on BEA 8.1 SP5 clusters, Iplanet web front ends, Mainframe database and Oracle database, MQ is also involved. Also uses JCA/Legacy vendor solutions from Neon and IWay (I have no clue what they are but will learn soon).
Now, i was involved in discussions where the Oracle database needs to be "replicated" onto another Oracle database box in case if the "live and connected" Oracle database goes down. Basically it is related to HA.
So, do you folks have any best practices guidlines which we can reference to better design this application ?
any help is greatly appreciated.

You should be able to link your objects using methods in your entities to create an object graph.
When you save your user the associated objects will also be persisted based on the cascade types that you have specified on the relationships between the entities.

Similar Messages

  • A design question related to generic dao pattern

    I follow this link https://www.hibernate.org/328.html to design my DAO layer using jpa/ hibernate. And basically it works ok. However, I encounter a dilemma regarding to persistence relation between domain objects.
    My classes include
    User <--(many to many)--> Group
    Tables are USERS, USERS_GROUPS, GROUPS
    In User class, I have properties
         @JoinTable(name="USERS_GROUPS",
              joinColumns=
              @JoinColumn(name="USER_ID"),
              inverseJoinColumns=
              @JoinColumn(name="GROUP_ID")
         private List<Group> groups = new ArrayList<Group>();
         public User(String id, String account, String name, String password){
              this.id = id;
              this.account = account;
              this.name = name;
              this.password = password;
         public List<Group> getGroups(){
              return this.groups;
         public void setGroups(List<Group> groups){
              this.groups = groups;
         }In Group class,
         @ManyToMany(mappedBy="groups",fetch=FetchType.EAGER)
         private List<User> users;  
         public Group(String id, GroupName name){
              this.id = id;
              this.name = name;
         public List<User> getUsers(){
              return this.users;
         public void setUsers(List<User> users){
              this.users = users;
    ...Now in the database (mysql), I have already had two groups existing. They are
    mysql> select * from GROUPS;
    +----+------+
    | ID | NAME |
    +----+------+
    | 1  | Root |
    | 2  | User |
    +----+------+and in the table USERS_GROUPS
    mysql> select * from USERS_GROUPS;
    +--------------------------------------+----------------+
    | USER_ID                               | GROUP_ID |
    +--------------------------------------+----------------+
    | 1                                               | 1                 |
    | 1                                               | 2                 |
    +--------------------------------------+----------------+When I want to create a new user object and assig user object with an existing GROUP (e.g. GroupName.User)
    At the moment the way how I implement it is done in the DAO layer (e.g. UserDaoImpl). (But what I want is to get this procedure done in the domain object layer i.e. User class, not DAO layer. )
    steps:
    1.) search the GROUP table (entityManager.cerateQuery(" from Group").getReulstList())
    So it will return a list of all groups in GROUPS table.
    2.) then check if the group (e.g GroupName.User) I want to assign to the User object existing in the GROUP table or not.
    3.) if not existing, create a new Group and add it to a list; then User.setGroups(newList);
    or
    if the group (to be assigned to User class) already exists, use the group retrieved from the GROUP table and assign this group to the User class (e.g. groupList.add(groupFoundInGroupTable) User.setGroups(groupList))
    However, what I want to do is to encapsulate this procedure into User calss. So that in DAO class whilst performing function createUser(), it would only need to do
    User user = new User(....);
    user.addGroup(GroupName.User); // GroupName is an enum in which it contains two values - Root, User
    entityManager.merge(user);Unfortunately, because I need to obtaining Group collections from GROUP table first by using entityManager, which does not exist in the domain object (e.g. User class). So this road looks like blocked.
    I am thinking about this issue, but at the moment there is no better solution popped upon my head.
    Is there any chance that this procedure can be done more elegantly?
    I appreciate any suggestion.
    Edited by: shogun1234 on Oct 10, 2009 7:25 PM

    You should be able to link your objects using methods in your entities to create an object graph.
    When you save your user the associated objects will also be persisted based on the cascade types that you have specified on the relationships between the entities.

  • Design an uix page which is not related an database table

    Hi;
    I want to design a uix page, but this page elements is not related an database table, only pass through the parameter to run a report, how can i do this easly
    Thanks

    Such functionality is not generated/supported by JHeadstart. But you can build this page manually using JDeveloper. Please use the JDeveloper online help and/or the JDeveloper forum for help if you get stuck.
    In monitoring this forum we have to set priorities, and we simply lack the resources to help you with questions not related to JHeadstart. I hope you understand this.
    Steven Davelaar,
    JHeadstart Team.

  • Design question for database connection in multithreaded socket-server

    Dear community,
    I am programming a multithreaded socket server. The server creates a new thread for each connection.
    The threads and several objects witch are instanced by each thread have to access database-connectivity. Therefore I implemented factory class which administer database connection in a pool. At this point I have a design question.
    How should I access the connections from the threads? There are two options:
    a) Should I implement in my server class a new method like "getDatabaseConnection" which calls the factory class and returns a pooled connection to the database? In this case each object has to know the server-object and have to call this method in order to get a database connection. That could become very complex as I have to safe a instance of the server object in each object ...
    b) Should I develop a static method in my factory class so that each thread could get a database connection by calling the static method of the factory?
    Thank you very much for your answer!
    Kind regards,
    Dak
    Message was edited by:
    dakger

    So your suggestion is to use a static method from a
    central class. But those static-methods are not realy
    object oriented, are they?There's only one static method, and that's getInstance
    If I use singleton pattern, I only create one
    instance of the database pooling class in order to
    cionfigure it (driver, access data to database and so
    on). The threads use than a static method of this
    class to get database connection?They use a static method to get the pool instance, getConnection is not static.
    Kaj

  • Database Connection design question

    Hello, I have a design question. Awhile back I needed to create a database connection to SQL Server, so I created a class to do it
    import java.sql.*;
    import java.io.*;
    import java.net.MalformedURLException;
    import org.w3c.dom.Document;
    import org.w3c.dom.*;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import org.xml.sax.SAXException;
    import org.xml.sax.SAXParseException;
    public class SQLServerConnection
         private static Connection connection = null;
         public SQLServerConnection(String user, String password, String dbName) throws java.sql.SQLException
              getDBConnection(user, password, dbName);
         public SQLServerConnection(String configFileName) throws java.sql.SQLException
              getDBConnection(configFileName);
         private void getDBConnection(String user, String password, String dbName) throws java.sql.SQLException
             DriverManager.registerDriver(new com.microsoft.jdbc.sqlserver.SQLServerDriver());
             connection = DriverManager.getConnection(
                  "jdbc:microsoft:sqlserver:" + dbName, user, password);              
         private void getDBConnection(String configFileName) throws java.sql.SQLException
              String user;
              String password;
              String dbName;
              try
                   DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
                   DocumentBuilder db = factory.newDocumentBuilder();
                   Document doc = db.parse(configFileName);
                   doc.getDocumentElement().normalize();
                   // get the configuration information
                   password = getConfigParameter("password", doc);
                   user = getConfigParameter("username", doc);
                   dbName = getConfigParameter("databasename", doc);
                   getDBConnection(user, password, dbName);
              catch (MalformedURLException murle)
                   System.out.println("Unable to connect to: " + configFileName + " -- " + murle);
                   System.exit(1);
              catch (FileNotFoundException fnfe)
                   System.out.println("Configuration file " + configFileName + " not found.");
                   System.exit(1);
              catch (IOException ioe)
                   System.out.println("IOException: " + ioe);
                   System.exit(1);
              catch (javax.xml.parsers.ParserConfigurationException pce)
                   System.out.println ("Parser Configuration Error: " + pce);
              catch (SAXException saxe)
                   System.out.println ("SAXException: " + saxe);
         private String getConfigParameter(String paramName, org.w3c.dom.Document doc)
              NodeList nl = doc.getElementsByTagName(paramName);
              if(nl != null)
                   Node n = null;
                   for (int i = 0; i < nl.getLength(); i++)
                        n = nl.item(i);          
                        if(n.hasChildNodes())
                             NodeList children = n.getChildNodes();
                             return ((Node)children.item(0)).getNodeValue();
              else
                   System.out.println ("nl is null");
              return "";          
         public void setCatalog(String catalogName) throws java.sql.SQLException
              connection.setCatalog(catalogName);
         public Connection getConnection()
              return connection;
         public void closeConnection()
              try
                   connection.close();
              catch(java.sql.SQLException sqle)
                   System.err.println ("SQL Server Connection failed to close: " + sqle);
    }Later on, I needed to do the same thing for MySQL, so I created a class for that, MySQLServerConnection which is exactly the same as above, except for:
    private void getDBConnection(String user, String password, String dbName) throws java.sql.SQLException
              try
                   Class.forName("com.mysql.jdbc.Driver").newInstance();
                   connection = DriverManager.getConnection(dbName, user, password);     
              catch(java.lang.ClassNotFoundException cnfe)
                   System.out.println (cnfe);
              catch(java.lang.InstantiationException ie)
                   System.out.println (ie);
              catch(java.lang.IllegalAccessException iae)
                   System.out.println (iae);
         }Later, on, I did the same thing with OracleServerConnection. My question is, I know this is probably not optimal code. For example, I didn't originally have a close connection method, so I had to go in and code one for all 3. I'm assuming that an interface would be a good idea so that if I have to code another database connection class I make sure and include all of the appropriate methods. I'm also assuming that it would have been smart to have a master class, maybe something like DatabaseConnection and extended these classes from that. Am I on the right track? Totally offbase?

    @nclow - I will work on trying the Factory Pattern for this over the weekend and post when I finish to see what you think.
    @abillconsl - just to make sure I understand, you're saying that I just try to connect and it will cycle through the different database connection possibilities and connect when it finds the right one? If it fails all 3, log an appropriate message. One question I have about this is, I thought I was being object oriented by separating the different types of db connections (Oracle, SQL Server, MySql) into different classes. Am I missing the point of OOP by what I was/am trying to accomplish? Going overboard? Also, does your way try and connect to all 3 even if I connected to one already?
    Thx, Grantarchy
    Edited by: grantarchy on May 9, 2008 9:50 PM

  • Design Question for table - related columns

    Hi,
    I have some design question about table I am working on.
    Here are the sample fields in the table,
    process_begin_date
    process_approved_by
    process_signed_by
    process_monitor
    process_communication
    the same way I have around 10 groups, for ex
    other_begin_date
    other_approved_by
    other_signed_by
    other_email
    other_something
    Question: Is good have all 50 fields in the same table? or any better idea?

    Hi,
    Number of columns should not be any issue, but, proper normalization may be better for your design and scalability. If you can explain what you are storing in this table, you might get help if you need to have more than 2 tables in this particular scenario.
    If all these fields are related to a single entity, probably this single table is already normalized and needs not to be replaced by two tables.
    Salman

  • Some questions related to SAP XI

    Hello!
    I would like to know the answers for the following questions regarding SAP XI-context (if it possible with Yes/No and a short comment/explanation)
    <b>CAPACITY PLANNING GUIDELINES</b>
    a) Guidelines to size the server(s)?
    b) Guidelines for sizing the over all environment for High-Availability
    <b>ARCHIVING CAPABILITIES</b>
    a) Approach to archiving of obsolete data
    <b>PLATFORM SUPPORT</b>
    a) Software supported on HP-UX 11.i V2 (r6) on Itanium.
    b) software supported on Windows 2003 sp1 (x64) on AMD Opteron 
    c) software support aligned with release roadmaps for future versions of HP-UX and/or Windows Server
    d) Software supported on OS clustered servers  (If mutliple products, please indicate if all are support or list areas where clustering may not be recommended and why)
    <b>RELATIONAL DATABASE </b>
    a) Does your system run native to the Oracle 10g RDBMS (RAC) and database tools?  If not, please explain the databases and tools supported.
    b) database monitoring tools be used to manage impending maintenance needs and potential problems and performance impacts (i.e., tool will monitor and detect prior to real problem occurring)
    c) standard pre-defined SQL queries and related calculations provided for use with industry standard reporting tools
    d) database accept binary-large-objects (BLOBs) and  be referenced via the relational engine.
    Thank you in advance!
    Regards!
    A.Henke

    two questions related to this:
    1. Why Java is designed to only permit single
    inheritence, any stories behind the scene? I think
    some major reasons why "prefer interfaces toabstract
    classes" is accepted is rooted in this limitation.Yes, one of the reasons interfaces are better is that
    you can only extend one class, but implement many
    interfaces. Say you have a concrete class that should
    "implement" two different types. If those types were
    defined as abstract classes, you could only use one
    type. You could implement both types if they were
    interfaces though. So why java is designed to have this limitation? There may be some arguments before this is settled down. I always like to hear this kind of stories:)
    2. Base on the fact that once an interface is outof
    box and widely implemented, it is almostimpossible
    to change it. So how you guys design yourinterfaces?
    Could you share some? In my idea, I would designmy
    interfaces as compact as possible.You could extend the interface and start using that
    if you didn't want to break existing code. You
    couldn't use that implementation as an Interface1
    though, since the new methods only exist in
    Interface2, so that's not an optimal solution.So we may always need to add a new interface when we just want to add a new method.

  • LDAP design question for multiple sites

    LDAP design question for multiple sites
    I'm planning to implement the Sun Java System Directory Server 5.2 2005Q1 for replacing the NIS.
    Currently we have 3 sites with different NIS domains.
    Since the NFS over the WAN connection is very unreliable, I would like to implement as follows:
    1. 3 LDAP servers + replica for each sites.
    2. Single username and password for every end user cross those 3 sites.
    3. Different auto_master, auto_home and auto_local maps for three sites. So when user login to different site, the password is the same but the home directory is different (local).
    So the questions are
    1. Should I need to have 3 domains for LDAP?
    2. If yes for question 1, then how can I keep the username password sync for three domains? If no for question 1, then what is the DIT (Directory Infrastructure Tree) or directory structure I should use?
    3. How to make auto map work on LDAP as well as mount local home directory?
    I really appreciate that some LDAP experta can light me up on this project.

    Thanks for your information.
    My current environment has 3 sites with 3 different NIS domainname: SiteA: A.com, SiteB:B.A.com, SiteC:C.A.com (A.com is our company domainname).
    So everytime I add a new user account and I need to create on three NIS domains separately. Also, the password is out of sync if user change the password on one site.
    I would like to migrate NIS to LDAP.
    I want to have single username and password for each user on 3 sites. However, the home directory is on local NFS filer.
    Say for userA, his home directory is /user/userA in passwd file/map. On location X, his home directory will mount FilerX:/vol/user/userA,
    On location Y, userA's home directory will mount FilerY:/vol/user/userA.
    So the mount drive is determined by auto_user map in NIS.
    In other words, there will be 3 different auto_user maps in 3 different LDAP servers.
    So userA login hostX in location X will mount home directory on local FilerX, and login hostY in location Y will mount home directory on local FilerY.
    But the username and password will be the same on three sites.
    That'd my goal.
    Some LDAP expert suggest me the MMR (Multiple-Master-Replication). But I still no quite sure how to do MMR.
    It would be appreciated if some LDAP guru can give me some guideline at start point.
    Best wishes

  • Question about import database pk, fk

    Hi
    I want to ask a question about imported database. I imported database and I noticed tables doesnt have Primary key or foreign key. They havent relation between eachs. Why can this occured ?
    is it about import or another something?

    yeah ı am surprised none of tables have pk or fk ..
    but ı want to show you http://i51.tinypic.com/2hedc9d.jpg
    what is blue shapes in there ?
    can be foerign keys ?

  • SOA real-time design question

    Hi All,
    We are currently working with SOA Suite 11.1.1.4. I have a SOA application requirement to receive real-time feed for six data tables from an external third party. The implementation consists of five one-way operations in the WSDL to populate the six database tables.
    I have a design question. The organization plans to use this data across various departments which requires to replicate or supply the data to other internal databases.
    In my understanding there are two options
    1) Within the SOA application fork the data hitting the web-service to different databases.
    My concern with this approach is what if organizations keep coming with such requests and I keep forking and supplying multiple internal databases with the same data. This feed has to be real-time, too much forking with impact the performance and create unwanted dependencies for this critical link for data supply.2) I could tell other internal projects to get the data from the populated main database.
    My concern here is that firstly the data is pushed into this database flat without any constraints and it is difficult to query to get specific data. This design has been purposely put in place to facilitate real-time performance.Also asking every internal projects to get data from main database will affect its performance.
    Please suggest which approach should I take (advantage/disadvantage. Apart from the above two solutions, is there any other recommended solution to mitigate the risks. This link between our organization and external party is somewhat like a lifeline for BAU, so certainly don't want to create more dependencies and overhead.
    Thanks

    I had tried implementing the JMS publisher/subscriber pattern before, unfortunately I experienced performance was not so good compared to the directly writing to the db adapter. I feel the organization SOA infrastructure is not setup correctly to cope with the number of messages coming through from external third party. Our current setup consists of three WebLogic Servers (Admin, SOA, BAM) all running on only 8GB physical RAM on one machine. Is there Oracle guideline for setting up infrastructure for a SOA application receiving roughly 600000 messages a day. I am using SOA 11.1.1.4. JMS publisher/subscriber pattern just does not cope and I see significant performance lag after few hours of running. The JMS server used was WebLogic JMS
    Thanks
    Edited by: user5108636 on Jun 13, 2011 4:19 PM
    Edited by: user5108636 on Jun 13, 2011 7:03 PM

  • SCCM 2012 Database Replication Monitor Child Site Details Empty

    We have a Secondary site for which no data will show up under Monitoring/Database Replication/Replication Status/Child Site.  It just states "No items found." as seen in the attached pic.  All other secondary sites show various configuration parameters,
    etc. on the Child Site tab.  What is blocking CM 12 from getting this information for this particular child site?  Any ideas?  Something firewall or access related maybe?

    was there any solution to this? I am having the same issue with the same version of Config Manager.

  • Workflow design questions: FM vs WF to call FM

    Hereu2019s a couple of workflow design questions.
    1. We have Workitem 123 that allow user to navigate to a custom transaction TX1. User can make changes in TX1.  At save or at user command of TX1, the program will call a FM (FM1) to delete WI 123 and create a new WI to send to a different agent. 
    Since Workitem 123 is still open and lock, the FM1 cannot delete it immediately, it has to use a DO loop to check if the Workitem 123 is dequeued before performing the WI delete.
    Alternative: instead of calling the FM1, the program can raise an event which calls a new workflow, which has 1 step/task/new method which call the FM1.  Even with this alternative, the Workitem 123 can still be locked when the new workflowu2019s task/method calls the FM1.
    I do not like the alternative, which calls the same FM1 indirectly via a new workflow/step/task/method.
    2. When an application object changes, the user exit will call a FMx which is related to workflow.  The ABAP developer do not want to call the FMx directly, she wants to raise an event which call a workflow .. step .. task .. method .. FMx indirectly.  This way any commit that happens in the FMx will not affect the application objectu2019s COMMIT.
    My recommendation is to call the FMx using u2018in Update tasku2019 so that the FMx is only called after the COMMIT of the application object.
    Any recommendation?
    Amy

    Mike,
    Yes, in my first design, the TX can 1. raise a terminating event for the existing workitem/workflow and then 2. raise another event to call another workflow.   Both 1 and 2 will be in FM1. 
    Then the design question is: Should the FM1 be called from TX directly or should the TX raise an event to call a new workflow which has 1 step/task, which calls a method in the Business object, and the method calls the FM1?
    In my second design question, when an application object changes, the user exit will call a FMx which is related to workflow.  The ABAP developer do not want to call the FMx directly, she wants to raise an event which call a workflow, which has 1 step/task, which calls a method, which calls the FMx indirectly.  This way any commit that happens in the FMx will not affect the application objectu2019s COMMIT.
    My recommendation is either call the FMx using u2018in Update tasku2019 so that the FMx is only called after the COMMIT of the application object or raise an event to call a receiver FM (FMx).
    Thanks.
    Amy

  • Question related to Synchronous update

    Hi, all
    I have some question related to synchronous update:
    1. What is the syntax if I want to write synchronous update.
    Do i write as:
    call funcition A in update task
    commit work and wait
    Or just
    call function  A (A declared as update type function )
    commit work and wait
    Or ...
    2.If we use synchronous update, is VBHDR,VBDATA still filled the same way when using asynchronus update?
    Thanks in advance,
    Liming

    Hi,
    Why do we use this " In Update Task " ??
    The main update technique for bundling database changes in a single
    database LUW is to use CALL FUNCTION... IN UPDATE TASK.
    How do we Use ??
    A typical R/3 installation contains dialog work processes and at least one update work process. The update work processes are responsible for updating the database. When an ABAP program reaches a COMMIT WORK statement, any function modules from CALL FUNCTION... IN UPDATE TASK statements are released for processing in an update work process. The dialog process does not wait for the update to finish. This kind of update is called asynchronous update.
    What is the Use... ??
    Asynchronous update is useful when response time from the transaction is critical, and the database updates themselves are so complex that they justify the extra system load

  • ACS SE Database replication fails

    Hello, I recently upgraded our ACS SEs from 4.0 to 4.1. All appeared to go OK but I checked the logs recently and saw the the database replication is failing with the message:
    ACS '[hostname]'is running a different version of ACS - aborting.
    All ACS SE were upgraded at the same time and display the same versions when examining the Appliance Upgrade page. Does anyone have any ideas what the problem is?
    Thanks in advance.

    Hi, I am having a related problem but in my case I am using ACS for Windows ver.4.0. I am replicating from one primary ACS to three other ACS using scheduled nightly replication.
    The problem is that the data is being updated on all three ACS servers, but in the database replication logs on the primary I get messages stating that "ACS-server-name replication failed possibly due to short time-out or dead". Moreover, not all three servers timeout. Sometimes one server timeout, and other times two servers timeout, etc.
    On the replicated servers logs, the only log, in case server times out, shows that "replication cycle starting....". while when replication is successfull, it also shows Replication cycle completed successfully.
    I have played around with the timeouts but the result is random. I have also checked if there are any bandwidth issues, but replication is scheduled at night with minimal network traffic and the servers are also not being used for authentications.
    Don't understand why I don't see successful messages all the time, specially when the data does get updated on the replica ACS.
    Thanks.
    MAG

  • ACS Database Replication

    I have 2 ACS server
    - ACS Appliance(v4.0)
    - ACS Server fo Window(v3.0)
    I want to design Primary ACS Appliance and Secondary ACS for Window
    I know the method For ACS Database replication
    Thanks
    cheolhyeon

    Hello Hanwu
    Please send a the screenshot of replication page from primary server.
    thanks
    Devashree

Maybe you are looking for

  • Problem with navigation in app javascript

    Hi, in my app there are some problems for the navigation between the pages. in the app there is a descrption of the problems. can you help me? please.. it is important for me https://onedrive.live.com/redir?resid=EED8037DD05FCED!79109&authkey=!APeraV

  • IMovie fails to start on specific user

    Hi! I'm about to throw my Macbook against the wall because of this problem. I've wasted enormous amounts of time trying to fix this. The case is that iMovie won't even open in my user account. The Apple Store genius is not an option because, as you s

  • WEBUTIL within form Problem

    dears, i was design an form that read an excel sheet and upload the excel sheet contant into a table on DB, the excel sheet contain only 2 columns, the problem is when i compile the form CTRL+K there is no errors shown but when the form run i click B

  • Best practice for audit management

    Hi, Is there any best practice for audit management in SAP ?

  • "Can't find recent OpenSSL libcrypto" error when configuring openssh 4.3p2

    This is being done on a new install of Solaris 9 (patched) with Studio 11 installed. I complied openssl 0.9.8a with the following: config --prefix=/usr/local shared openssl builds fine and the output of openssl version is Openssl 0.9.8a. When I try a