Mark Spritzler wrote:What is the client? What transport is needed. Without a GUI, things like Spring Remoting, Spring Web Services, Spring JMS and Spring Integration come to mind as solutions. Spring MVC is for Web development, and I wouldn't want to use it in some other capacity. Spring has all the other options covered with different projects, so we can help steer you in the right direction with more information.
Mark
Mark Spritzler wrote:Well the funny thing is that Oracle uses BPEL as their web services language. So the question again, is what exactly is Oracle going to call. So you have a jar file, and it loads the classes in the jar file, and calls Java code. The real question is what is that Java Code, and can it pass Java objects, or is it passing in XML. To me it still sounds like something in JBoss Remoting, but still within maybe the same JVM. Something like Burlap or Hessian might work.
We still need more information. But definitely Spring MVC is not your solution.
Mark
Mark Spritzler wrote:Nope that is perfect.
So it is a plain simple Java call to a POJO. So the simplest solution is create a singleton that creates the instance of the ApplicationContext, then the "dispatcher" just takes in a string. It would be best if the information passed in, "String" was the name of the bean. Then you can just take that String value and call getBean(String) and you have the Spring configured bean.
No need for some over complex logic to determine things like which controller to call. It won't be a controller, and it wouldn't be a dispatcher servlet.
Mark
Mark Spritzler wrote:1) Definitely only create one instance. ApplicationContext objects are heavyweight, and could take a bit of time to create, so creating it up front is the best way.
2) Your service layer objects and DAO layer objects should never hold any state, and therefore, having the default Singleton scope should be plenty fine. Where, if you have performance issues, it becomes adding more hardware to a cluster/farm, rather than changing how code works. In my opinion.
But if you want a new instance of your objects, then changing the scope to "prototype".
Mark
"How many licks ..." - I think all of this dog's research starts with these words. Tasty tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
|