LotusScript to Make a new web user able to log in immediately

Bill offered some advice yesterday about a problem I’ve been having with new user registrations for Defectr.

What was happening was that a new user would register, everything would work fine but it took up to 15 minutes for the new account to work. I thought I had tried all combinations of solution but am also running the Defectr registrations in a Directory Assistance NAB (ie not the primary NAB on the server) so assumed that that was the source of the problem. But Bill’s posting spurred me to have another quick look and it seems like I’ve got it fixed now.

All of the work I had been doing was around refreshing views in the NAB in which the users were being created, it never occurred to me to refresh the same views in the main NAB but when I did the new account worked straight away. I have no idea why this would be the case, any idea you admin types?

Anyway, this is the code I now run when a new user registers:

Option Public Option Declare Use "OpenLogFunctions" Use "slnnotesdll" Sub UpdateNAB On Error Goto Whoops Dim commander As New nnotesdll Dim sess As New NotesSession Dim strError As String Dim server As String Dim scommand As String Dim strResponse As String Server = sess.CurrentDatabase.Server sCommand = |load updall names.nsf -t "($ServerAccess)" -r| strResponse="" strError=commander.rConsole(Server,sCommand,strResponse) Sleep 1 sCommand = |load updall names.nsf -t "($Users)" -r| strResponse="" strError=commander.rConsole(Server,sCommand,strResponse) Sleep 1 sCommand = |dbcache flush| strResponse="" strError=commander.rConsole(Server,sCommand,strResponse) Sleep 1 sCommand = "Tell Adminp Process People" strResponse="" strError=commander.rConsole(Server,sCommand,strResponse) Sleep 1 sCommand = "Show nlcache reset" strResponse="" strError=commander.rConsole(Server,sCommand,strResponse) Exit Sub Whoops: Call LogError() gResponse = "ERROR: " + Error Exit Sub End Sub
This LotusScript was converted to HTML using the ls2html routine,
provided by Julian Robichaux at nsftools.com.

Tags: Show-N-Tell Thursday

Review of the Year – 2006

2006 has been quite a year split into 3 distinct sections for me.

I finished a very long contract in early March so the first couple of months of the year (apart from the obligatory Lotusphere interlude) were spent preparing to leave. In theory, being a contractor should mean that I just up and go with almost no handover, but when you’ve been in a role for almost six years and run three relatively large applications, it took me quite a while to not feel too guilty about leaving. Even then, the guys that took over from me were left very little time to get up to speed as the hiring process of the company was so slow off the mark.

The next three months were so chilled out it’s hard to imagine how relaxed I was back then. A week in Sweden was followed by as much free time as I liked to play around with new technology and development. And then just to make sure the time off was really memorable I decided to take a bit of a road trip across the States. After getting back in mid-May I sent my CV out to a few agencies to test the water more than actively looking for a job.

Setting aside the arguments about the dominance of Domino or Exchange, IBM or Microsoft, there is no doubt that the contract market for Domino developers has shrunk considerably over the last few years. These days the people on the market are pretty much exclusively very good (back in 2002/03 there were some real cowboys out there who have thankfully left the market now) and although there is always a steady trickle of jobs going, the competition is very strong. With this in mind I had set myself up for a long wait, being in the lucky position that I could pick and choose what I wanted to do. It was a great surprise then that after just a couple of weeks I was offered a very interesting contract back in the City for a large insurance company developing applications which are properly internet facing, integrate with J2EE and increasingly MySQL, Oracle and DB2. A first for me in work life and a good challenge.

So back onto the trains then! That was a real shock to the system. The thing about the long commuting is that it’s a habit, when you’ve been doing it for a while you forget quite how much of your day is spent travelling. But when you stop and then start again it’s a real struggle and it was that which persuaded me to, once again, think about moving down to London. I’ve bored everyone enough about that palaver suffice to say that I’m all settled now and very very glad that I made the move. It makes such a difference to be able to be in the office within 30 minutes in the morning.

There’s been a few other family things going on over the last couple of months which I don’t really mention on here but it looks like everyone is recovering well from those problems. But the last quarter of the year really hasn’t been fun with the stress of moving along with the other stuff happening. By Christmas time I really needed the few days off to go off-line, completely recharge the batteries and generally recover.

I’m very aware that I haven’t been posting technical entries for a while now. That’s due to a combination of other things taking precedence but also the fact the my technical attentions have been diverted recently away from Domino and towards J2EE, more specifically web services. It’s all very interesting for me but there are far better sites out there to provide you with your technical fix than I could write. That being said, I do miss putting things up here so one of my resolutions for 2007 will be to be a little more consistent about posting the interesting blog entries rather than the flotsam of my life.

Of course I still have a long list of feature requests to deal with on Defectr. I’m so pleased with the feedback I’ve had from that and also the consistent (and increasing usage) of the system. It’s definitely not a money earner yet but that wasn’t really the point initially. It’s taught me a lot about the Dojo framework and what I would do differently in future when using one of the larger Ajax frameworks. As ever, if you have feedback please drop me a line and I’ll get back to you as soon as I can.

So, that’s another year done with. Overall I’d say an A- grade, the Domino technology and community continues to improve and amaze. Bring on 2007 and Lotusphere.

Wishing a happy new year to you all, let’s hope it’s a good one again.

Merry Christmas Everyone

Well the flat is basically unpacked now, I just need to get rid of all of the empty boxes down at the local tip but I think that can wait until after Christmas.

I’m heading back up to Suffolk for Christmas Day and Boxing Day so will be offline until Wednesday.

Until then, wishing all of you and your families a very safe and enjoyable Christmas holiday.

All Moved

Wow, what a day it’s been. Up early to drive down to London and since then it’s been non-stop, in fact this is the first time I’ve sat down all day.

The removal men turned up at about midday, it took them four hours to unload everything. Boy do I have a load of crap! The spare bedroom is absolutely jam packed with boxes, it’s going to take me quite some time to sort that out. As soon as the movers arrived the lift decided to break so the poor guys had to carry everything up to the fourth floor where my new flat is. Needless to say they got a big tip, there is literally no way I could have done all that work!

But now at least the sofas are out, the TV is on and I’m having some dinner. As is also obvious, I have a broadband connection already. I have to praise BT who have been absolutely true to their word. I got a text message over the weekend saying it was all done but I was still expecting problems. As soon as I plugged in the phone it worked and the ADSL modem connected first time as well (with an 8mbps connection speed). Very impressive.

And finally, the picture is what the move has been all about, this is what the view out of my living room looks like now. Pretty impressive I think you’ll agree.

Now, to crack a bottle of champagne and relax!

Completion

I just got the call from my solicitor that we have completed on my purchase. Woohoo! I can go and pick up the keys after work today and then the plan is to move down on Monday.

And relax.

Deep into Christmas Party Season

With less than two weeks to go the Christmas parties are coming thick and fast. We’re all off to the glamorous Chartered Accountants Hall tonight for a(nother) works do. It should be a good one as all the booze is laid on apparently.<hic>

The money for my move has been sent off to the solicitor and all systems are go for completion on Friday but unfortunately because everything has suddenly kicked into gear so quickly I couldn’t arrange the removal guys to deliver my stuff from storage until Monday so a couple of days more before I finally get into the new place. I really can’t wait now.

Oh well, I’ll have to make do with partying for the next few days instead :o)

We have exchanged

After a thoroughly unpleasant and stressful process, yesterday afternoon we finally exchanged contracts on my new flat so I get hold of the keys next Friday once all of the money has been transferred around the place.

It’s really great news as I was beginning to believe it was going to fall over into the new year. There were lots of "interesting" phone calls and emails flying around between the various parties but in the end it has all come together with no real nastiness although it was getting close at times. The lesson from the process is that this country really needs an overhaul of our property conveyancing procedures but, unfortunately the government has already made a total mess of those reforms so things are going to carry on as they are now for quite some time to come.

Two things are certain, I really need a few days off when I’m moved in (good timing with Christmas etc). And I will not be moving again for quite some time!

Homeless

Well I’m now officially homeless, the removal men arrived at 8:30 this morning and left at midday on the dot. They did a cracking job in fairly crappy weather, managed to keep everything dry and clean and didn’t mess up the house too much for the new residents.

There are still “negotiations” going on between my solicitor and the vendors about the huge number of missing documents. When these people moved in, the solicitor they used missed so many things it’s ridiculous. My lawyer is somewhat more thorough which is annoying in one way, we should have completed well over a month ago now. But I guess in the long run this sort of stuff needs to be done properly. She still thinks it’s possible to complete before Christmas, I’m less convinced and so will be looking for short term rentals as well as everything else going on at the moment.

So I’m sat in Starbucks now which is going to be my main network connectivity until I move down to London so apologies if I am slower than usual to respond to emails etc.

What a community we have

I go offline for 12 hours and in the space of that time Volker has managed to raise over 1300 pounds to pay for a new MacBook for Ben in appreciation for all of his work on DominoWiki. Honestly it is an honour to be a part of such a great community.

Lucky after all

I had already got over the disappointment of not getting a speaking slot at Lotusphere. But judging by this thread over at the Turtle’s site it appears that even if you did get approved you still have to pay for your ticket. Surely that can’t be right? If it is then what benefits do speakers get (other than the kudos and CV fodder) for all of the effort which goes into preparing their presentations?