|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
Lingo and service reconnects Hey Folks,
We've got a simple Lingo configuration with running services with embedded brokers, and clients connected with the "tcp" connector. This creates a single socket between client and server which is re-used for all requests, which is what we want. If the server goes down, however, even for a few moments, (or more likely, we lose network connectivity), all our clients end up throwing IllegalStateException, complaining that "The Session is closed".
Is there some way to get the client to reconnect? What would be appropriate call? The "failover" connector seems to almost work, but doesn't handle the case where the server is down when the client is initializing, as well as a few other cases.
My only other idea would be to add some Spring AOP interceptor, to check the state, and create a new Connection if it looks like it is closed. Any ideas for a good entry point into Lingo for such an interceptor? JmsProducerConfig has methods to createConnection(), and createSession(). Can I be certain that Lingo will use these methods to create Connections ???
thx ...
jerome
|
|
|
Re: Lingo and service reconnectsSorry it took me so long to reply to this one :)
On 12/21/06, Jerome Banks <jerome.banks@...> wrote: > > Hey Folks, > We've got a simple Lingo configuration with running services with > embedded brokers, and clients connected with the "tcp" connector. This > creates a single socket between client and server which is re-used for all > requests, which is what we want. If the server goes down, however, even for > a few moments, (or more likely, we lose network connectivity), all our > clients end up throwing IllegalStateException, complaining that "The Session > is closed". > > Is there some way to get the client to reconnect? What would be > appropriate call? use failover: > The "failover" connector seems to almost work, but > doesn't handle the case where the server is down when the client is > initializing, If you want to startup when there is no JMS broker available, then you need to initialize your Lingo proxies in a background thread. So maybe you need to add an AOP facade to lazily create the Lingo proxies on demand. > as well as a few other cases. Like what? > My only other idea would be to add some Spring AOP interceptor, to check > the state, and create a new Connection if it looks like it is closed. This is pretty much exactly what failover: already does on Apache ActiveMQ. Its pretty hard to do (recreating all destinations, consumers, producers, sessions and replaying any in-transit messages or acknowledgements or transactions) - which is why we added this feature into ActiveMQ :) -- James ------- http://radio.weblogs.com/0112098/ --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: Lingo and service reconnectsJames,
Thanks for your feedback. In the end, we developed an AOP reconnect mechanism on top of Lingo, ( basically an interceptor which checks for session closed exceptions, and a target source which reloads a bean from a context when an error occurs.)
The problem was that one of our main configurations was simple client/server. Each server had an embedded broker, which the client connected directly to. The failover: works if the server goes down briefly, and then comes back up, but if it really is down for an extended period, (which it could be), we want to get an error. Then the next time around, if we try again, and the server is up, we want all the sessions to be reinitialized. And also, the case where the client comes up first, and the server is down.
I think the issue might be a square peg/round hole problem, (making JMS look as much as client/server as possible), rather then any particular bug/missing feature in ActiveMQ. The failover: works fine if we assume that some form of JMS is up and running somewhere, or will be shortly. I think it might make sense to extend Lingo in some way, however, since it is trying to solve this problem.
thx...
--- jerome
On 2/9/07, James Strachan <james.strachan@...> wrote:
Sorry it took me so long to reply to this one :) |
| Free Forum Powered by Nabble | Forum Help |