Hi there, I'll dive in here.
What's the idea behind this line? This looks to be resetting hAppServer to be the handle of your current client session, which surely isn't what you want. I'd remove this unless you have a real reason for it.
If i run this, it's giving me messages like "unexpected coonect request in state free mode. Application server connect failure."
You haven't yet mentioned your appserver settings. What Operating Mode have you selected? If you have actually chosen "state free", then your connect statement must change to reflect this. You should try something like:
Code:
hAppServer:CONNECT("-sessionModel Session-free -AppService asbroker1 -H 10.29.15.57 -S 5162").
Can u tell me please about the port number "5162".
5162 is the default port of the NameServer. This is an appserver management agent which allows (amongst other things) load balancing across hardware. Typically, you either use the NameServer and your connect statement looks the way you have specified, or you use DirectConnect to bypass the NameServer (which then means you don't need to run the NameServer at all, saving some resources).
By default, you've probably got a NameServer called NS1 running on port 5162, and your appserver asbroker1 (I would rename this to something more meaningful) is registered to it. Nothing wrong with this as an initial config.