java - How to structure projects when multiple applications use the same database -
I have a Java web application that connects to a MySQL database to be in Spring, Hibernate, and I'm using a refactor and I want to separate it in many applications, I started using Maven's Multi-module system, but in reality my application will be cycled in every application, so I have cheated this effort now and I I am trying to create separate projects for each of them. They will all continue to connect to the same database, so I was going to move Model Classes into a project of their own, which can be used as a dependency.
I have a few questions about this setup:
-
Whether a model solution for multiple apps / single database issues in their own projects Run, or is there any other way?
-
Is there a good way to ensure that all applicants are using the same version of model dependency?
-
Should I include any base demos and services in this original project that every application can be used or expanded, or should I have my
Generic Hibernate Daveshould be included and each application should build its slaves and services? Obviously I would like to save this project from changing as much as possible because a new release of all applications will be required. -
Is there a hibernate-related configuration that needs to be changed, such as pooling connections? Does it matter whether each app has its own pool or should it share one? I am not using caching at this time, but I think if I want to have a distributed cash I need it?
-
How do I share application configurations such as DB Param, Email Host, SMS Gateway etc between applications? Is there any way to define them once, to make sure they all point to the same DB?
-
Is anyone else available, either with Maven or during the deployment? Any tips or best practices should follow?
They have become commonplace with me, which I usually have Have done on ... - DAO, Con. Pool management, unsuccessful code can be managed by writing different modules [Jar] - then you can use this module in components as you mentioned.
With it you will have a separate connection pool for each of your components.
Comments
Post a Comment