I'm new to this and is looking at Apache Camel, Spring Integration and even Terracotta.
I'm looking at sharing of common data like user/groups/account/permission and common business data like inventory/product details/etc.
Any example will be really appreciated.
dynamically change spring beans
call 2 or more views with one controller in spring java
Is anyone using SpringSource tc server as a Tomcat replacement?
Have both applications access the same relational database.
I'm interviewing for a j2EE position using the Spring Framework; help me brush up
Those are built for that kind of task..
annotations in Spring MVC
To do that, the two applications can use a shared library (of which for the sake of simplicity each one will have a copy in their WEB-INF/lib)..
How assign bean's property an Enum value in Spring config file?
Is fine grained control of aspectj-autoproxy possible in spring?
Do I want to minimize the scope of @Transactional?
Hence you need to have a common classloader which knows about the classes in common, and - to be 100% compliant - these classes may not be in either web apps WEB-INF/lib.
This is hard to get right, and the result is fragile.. Therefore consider migrating to a web container which can deploy EAR's instead as they may contain several web applications sharing objects.
I believe a good choice for starting would be JBoss..
I'm looking at sharing of common data like user/groups/account/permission and common business data like inventory/product details/etc..Common data like users, groups, and permissions belong in a central LDAP or database.
These are part of your Spring Security solution, and all apps can share those regardless of whether they're on the same app server or not.. It can be argued that common business data like inventory, product details, etc.
should be "owned" by a single service.
It's the only one that can modify the data.
Others can get access by querying the service, but it's the one that manages CRUD operations on those tables.. If you do this, you keep objects and systems from being coupled at the database level.
You're trading looser coupling for increased network latency..
set up a communication channel (web services are a bit of an overkill, but a good example) and have the applications request info from each other.. If there is massive sharing, perhaps the two applications should be reading from the same database or local file.
Mind you, This brings up synchronization issues, and gets you into the realm of lockings and blockings.
Tread lightly in this realm....