Forum OpenACS Q&A: Should [ad_conn isconnected] return true in scheduled procs?

I'm having this problem with forums where the scheduled proc to index messages thinks it has a connection but can't find session_id. But I wouldn't have thought that ad_conn would return true for isconnected in a scheduled proc...?

Note that this information is only available if you have a
connection. A common error is to include this within a scheduled
procedure that runs when no connection is available.

By the way, I tried to add this to the ad_conn documentation in api-doc, but I didn't have permission to commit it. If anybody else wants to commit that blurb in


feel free.

Well if ad_conn only works if you're connected it's odd that it supports "isconnected", no? :)
"ad_conn isconnected" should fall through to "ns_conn isconnected" and that should work. It's conceivable it's broken in aolserver 4.0 though so you might check if ns_conn isconnected also returns true.

One other thing is that you should be able to call ad_conn locale outside a session, but maybe something in the i18n stuff snuck in to break that.

(Jade laughs and reminds himself to carefully read the forum posting before replying to them).

Thanks Don!