wood burning stoves*
The moose likes Websphere and the fly likes Stateless session beans again ! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "Stateless session beans again !" Watch "Stateless session beans again !" New topic
Author

Stateless session beans again !

Matt Sumner
Greenhorn

Joined: Oct 16, 2002
Posts: 19
3.5.0 seems to be removing my stateless session bean after each method invocation.
Is this normal behaviour for 3.5.0 ?
Does, 4.0 have more control over this ?
Does anyone know how to make my instance hang around in the pool across method invocations ?
Ta!
Simon Song
Ranch Hand

Joined: Feb 01, 2002
Posts: 217
Why you care about it?
EJB container has its own eviction policy to remove instance from pool.


Simon Song
Certified Entperise Developer of Websphere
Matt Sumner
Greenhorn

Joined: Oct 16, 2002
Posts: 19
Because I'm keeping an external resource open, a socket, that is created and removed with the bean.
Also, I thought that was the whole point of stateless session beans - performance.
I don't believe this is normal behaviour and I'm pretty sure 3.5.1 doesn't do it ?
And I can't believe no one else has experienced this ?
Come on you guys, who would prefer their stateless session beans to be instance pooled correctly, I know I do !!!
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
Matt -- stateless == "No State" -- to most people that means "no instance variables". I personally have never thought about putting a socket connection in an SSB. So is the socket just being used for a one-time-only connection in each business method? (In other words, are you using your SSB as an instance-pooling mechanism for your socket connections)? I'm still not quite clear on what you're trying to accomplish.
Kyle


Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at http://www.kyle-brown.com/ for other WebSphere information.
Matt Sumner
Greenhorn

Joined: Oct 16, 2002
Posts: 19
Ok... a bank using my software insists that the only network traffic from their DMZ to the mainframe must be over EJBIIOP. Now we have our own prop xml protocol between nonEJB java and the mainframe... So I have wrapped my socket stuff into a stateless bean.
They have been using it fine on 3.5.1 with instance pooling working. I've tried to use it on my 3.5.0 and it unloads the instance with every method..
So I want to know what the difference between my WS and the banks is - apart from version !
Matt Sumner
Greenhorn

Joined: Oct 16, 2002
Posts: 19
And anyway, a stateless session bean means a client cannot assume state between methods calls.
My bean doesn't each method call passes enough info down to supply it's own context...
My bean is really just a proxy.
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
OK, at least I know what's going on now. So, there were a huge number of PMR's against 3.5.0 when it came out, which is why 3.5.1 came out so quickly. So, why can't you upgrade to 3.5.1, since it works at the bank? The bug-fix upgrade, after all, is free.
Kyle
[ October 31, 2002: Message edited by: Kyle Brown ]
Simon Song
Ranch Hand

Joined: Feb 01, 2002
Posts: 217
Telling the truth, you should get a free instance pooling solution. And put your socket factory on top that pooling, this is more flexible than using SLSB to keep open connections. Don't forget, EJB container can always purge out SLSB at any time. So your sock connection will be gone. But put it in a instnace pooling, you can control it, not EJB container.
This gives you better control. And if 3.5.1 fixes the problem, just use it. Why stick with 3.5.0, if you know it is broken?
IBM won't pay you as a QA person.
Matt Sumner
Greenhorn

Joined: Oct 16, 2002
Posts: 19
Thanks for the help so far.
I tried to find a bug fix and 3.5.1 but couldn't see it anywhere on the website.
Does any one know how to get it ?
Everything seems to be 4.0-centric !!
Ta
Simon Song
Ranch Hand

Joined: Feb 01, 2002
Posts: 217
You just need download Fixpacks for WAS 3.5, you can just get the latest FP6(I think) for WAS3.5 give a try.
It should be available on the same service page.
Simon Song
Ranch Hand

Joined: Feb 01, 2002
Posts: 217
http://www-3.ibm.com/software/webservers/appserv/efix-archive.html
 
Consider Paul's rocket mass heater.
 
subject: Stateless session beans again !