gegas
Apr 28th, 2005, 08:20 AM
Hello!
I'm trying to design an application that should admit to be run as both a 2-tier and 3-tier.
The client is a Swing application in both scenarios.
On the 2-tier design the Swing application will use a pojoFacadeApplicationContext.xml configuration with only POJO's. All code is executed on a single JVM. No EJB's is used. Since there is only one Spring IoC instance we can refer to other context configuration files etc. Everything executes on one single machine.
On the 3-tier approach the client will use another ejbFacadeAppplicationContext.xml configuration looking up SLSB using Spring's SimpleRemoteStatelessSessionProxyFactoryBean. NOTE! There is a Spring IoC on the client-side. This (client) context configuration file cannot refer to a configuration file telling Spring how to wire the business objects , DAO's etc. since it's one a different machine (and all the business object class files is also on another machine - the app. server).
I'd like to use a businessApplicationContext.xml in the app. server that wires the correct DAO with the correct business object which is deployed as an SLSB on the server side. There is no need for the client to know about this. Is this possible? How is this business context configuration file loaded and read by a Spring IoC on the server-side?
All examples I've seen run a single instance of a Spring IoC using the web, but I like to run one at the client-side (switching context configuration files decides if we access local POJO's or remote SLSB) and one at the server-side (wiring up the business objects and DAO's).
Regards, Andreas Eriksson
I'm trying to design an application that should admit to be run as both a 2-tier and 3-tier.
The client is a Swing application in both scenarios.
On the 2-tier design the Swing application will use a pojoFacadeApplicationContext.xml configuration with only POJO's. All code is executed on a single JVM. No EJB's is used. Since there is only one Spring IoC instance we can refer to other context configuration files etc. Everything executes on one single machine.
On the 3-tier approach the client will use another ejbFacadeAppplicationContext.xml configuration looking up SLSB using Spring's SimpleRemoteStatelessSessionProxyFactoryBean. NOTE! There is a Spring IoC on the client-side. This (client) context configuration file cannot refer to a configuration file telling Spring how to wire the business objects , DAO's etc. since it's one a different machine (and all the business object class files is also on another machine - the app. server).
I'd like to use a businessApplicationContext.xml in the app. server that wires the correct DAO with the correct business object which is deployed as an SLSB on the server side. There is no need for the client to know about this. Is this possible? How is this business context configuration file loaded and read by a Spring IoC on the server-side?
All examples I've seen run a single instance of a Spring IoC using the web, but I like to run one at the client-side (switching context configuration files decides if we access local POJO's or remote SLSB) and one at the server-side (wiring up the business objects and DAO's).
Regards, Andreas Eriksson