Month: November 2003

Long time no blog.

A lot has happened in the last few weeks:

5* Training

I went to Plas y Brenin mountain centre for 5* training. This meant that we paddled both sections of the river Conwy. I love this river and intend to make it one that I paddle a lot. The only problem is that the second section has some class 5 stuff that you have to portage if there isn’t enough water. I also portaged some of it because I wasn’t up to it and the consequences of screwing up could have been death (a sump, for those of you who know what one is).

In terms of getting the 5* qualification I can’t even see it with a telescope on a good day. My river reading skills aren’t up to it and I’ve lost my fitness since being made redundant (I’ve also put on most of a stone in weight). My lack of fitness really showed on the second day.

My paddling in general has taken a knock recently in that I’ve copped quite a few swims when I didn’t used to, I think this is at least partly fitness.

I recommend PYB, lovely site, top tutors (Franco Ferrero – author of the classic Whitewater Safety and Rescue – was my tutor; you can’t get better than that, can you?)

Fitness

Found a gym near to where I work (a couple of miles). I will probably join it next week. This week I’m very busy going to meetings and trying to get some boating in.

Winbiz

I’ve decided to start taking the Amway stuff seriously and am even as I write going to a presentation at the Novotel in Nottingham. Basically it isn’t a rip off and you could make some serious money if you work at it. It isn’t a get rich quick scheme. To be honest, if I can live at home and take a less well-paid job I’ll be happy. The business proposition is very simple and works.

Non-paddle at the Washburn

We drove all the way there (100 miles) to discover that it wasn’t open. The alternative of the river Wharfe was open but there wasn’t any water in it. Had a nice cream tea.

Holme Pierpoint

Had a good paddle on Thursday and mastered one of the simple waves. Rolled a couple of times.

Travelling

Travelling home takes a long time. The M6 is nearly always solid after Stoke. I went across country on the A500 and up the A51 (I’m turing into an a-road bore, help!!!).

Oracle objects and queues

Becoming an expert in this but can’t be bothered doing a big post on it. Also discovered pipe functions which can be used as tables. Doubtless I will find a use for them.

Love to all.

King stupid

I was talking to one of my developer mates about my generator software that creates your implementation beans and then the rest of the EJB typing for you. I have just been trying to get it working and when I ask JDeveloper to check the EJBs it throws a wobbly, all sorts of exceptions not there, methods missing blah blah. Oh wucking funderful, says I, I’ll have to edit my templates and generally mess with them to get it going. Mate says – why not use XDoclet? I reread the stuff about XDoclet and realise I’ve wasted a lot of time when I could have just generated the implementation beans and got on with it! GAH! XDoclet was originally called EJBDoclet and was meant for doing the donkey bit of EJB development. It even supports the value class pattern. I wouldn’t mind, but I’ve already mentioned it in this blog in the past.

There’s no accounting for your own stupidity, but the path of your own groove often has very high walls it’s difficult to see over.

WiFi

Had a go with WiFi in Nottingham, went to a pub called the Corn Market (need to check this). They have a quiz machine that is wired with broadband. Part of this involves buying a token to use the network. I had a bit of hassle because XP (or the USR driver) was being picky about the network being insecure and wasted some time on it. The tech help (from the Cloud) was very good, ringing me back and so on. You SMS them and they SMS you back with the info. If you are a BT Openzone subscriber you can use your Openzone account; fine sez me, I’ll become a subscriber because it’s a little cheaper. I can’t get anyone at BT to sell me one of their products. They’re useless and the numbers on the web site take you to the wrong call centre. I will persist, but why can’t I just put my credit card in somewhere and get a king user ID?

I have also installed personal firewall on the laptop, not a good idea being open on public WiFi networks.

Paddling

Now a member of the Holme Pierpoint canone club. It costs £2 to paddle on Wednesdays and Thursdays. Need to get some practice in before I do my 5* training week after next.

Going to sleep now, if all the firework banging cretins in my area will let me.

Oracle Advanced Queueing remote subscriber notes

1. Read the manual. Set up the grants and stuff as directed. Note that the following assumes that you are connected to the database as finagle.

2. Create an old-style database link with the username and password in it. If you don’t AQ will try to log on to the remote machine as sys and give you an ORA-04052: error occurred when looking up remote object … error if you use the one where you just give the connect string. Some kind of security thing, the manual for the error message says you need some views installing. Ignore it and create one of these:

create public database link yada_remote
connect to finagle identified by frippery
using ‘yada.world’

(this cost me 2 days)

3. create your payload type on both instances say my_payload

create or replace type my_payload is object
( id   integer
, XML                CLOB
);

4. create queue table and queue on local instance and start it (I put this in a package to save typing and make it portable)

 dbms_aqadm.create_queue_table
  ( queue_table        => ‘marvy_queue_tab’
  , comment            => ‘My marvy queue’
  , multiple_consumers => TRUE
  , queue_payload_type => ‘my_payload’
  );
 dbms_aqadm.create_queue
  ( queue_name   => ‘finagle.marvy_queue’
  , queue_table  => ‘marvy_queue_tab’
  );
  dbms_aqadm.start_queue ( ‘finagle.marvy_queue’ ) ;

5. create queue on remote instance and start it

<same commands as before>

6. add remote subscriber on the local instance. The @link tells AQ that there is a subscriber at the remote instance. Do this on the local instance.

DECLARE
  subscriber         sys.aq$agent;
BEGIN
  subscriber := sys.aq$agent(null,‘finagle.marvy_queue@yada_remote’,null);
  dbms_aqadm.add_subscriber(
   queue
name         => ’finagle.marvy
queue’,
   subscriber         => subscriber,
   rule           => null,
   transformation => null );
END;

7. start propagation for local and remote destinations on source instance

EXECUTE DBMS_AQADM.SCHEDULE_PROPAGATION(-
   Queue_name    =>    ‘finagle.marvy_queue’ )

EXECUTE DBMS_AQADM.SCHEDULE_PROPAGATION(-
   Queue_name    =>    ‘finagle.marvy_queue’, –
   Destinatio   =>    ‘yada_remote’);

This will start pushing data to the remote queue. Note that <schema>.<queue> have to be the same.

8. Test it!

Send a test message:

— send an empty object
declare
thing my_payload ;
dummy raw(16) ;
begin
thing := new my_payload( 1, null ) ;
  DBMS_AQ.enqueue
  ( queue_name             => ’finagle.marvy_queue
  , enqueue_options        => <read the manual>
  , message_properties     => <read the manual>
  , payload                => thing
  , msgid                  => dummy
  );
end ;

— remote dequeue
declare
pi_dequeue_options        DBMS_AQ.dequeue_options_t  := <some clever package>.DEFAULT_DEQUEUE_OPTIONS ;
po_message_properties     DBMS_AQ.message_properties_t ;
po_msgid                  RAW ;
thing               my_payload ;
BEGIN
  pi_dequeue_options.consumer_name := ‘REMOTE_SUB’;

  DBMS_AQ.dequeue( queue_name             => ‘finagle.marvy_queue’ 
                 , dequeue_options        => pi_dequeue_options
                 , message_properties     => po_message_properties
                 , payload                => thing
                 , msgid                  => po_msgid
                 );
dbms_output.put_line( thing.id ) ;
END ;


If aq just isn’t working there’s a useful (but a little out of date) fault finder on metalink: http://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=233099.1.

I’m pretty curious about queues being used bi-directionally. I can’t see how it could stop you if you set propagation up on both instances. I may need this, but would have to then send messages to a specific subscriber or you’d be sending messages back to the same instance, maybe you don’t care.

Barking at the moon

I went for a walk this evening. It was a beautiful autumn evening with a two-thirds moon and the stars just peeking out from behind some cloud cover. The clouds were catching the distant neon glow, and just being pierced by the sharp points of light. I walked some way under the bright moon, talking to Rosie on the old earpiece and getting the crap out of my head with the excellent clear air.

It reminded me of another time when I used to walk alone in the sharp mornings and evenings, when I walked to school across the golf course. Now I know that most of us are fairly fixed in what we believe that we are seeing around us. For example, you expect to get home and see your home; to be known by the people there and have some measure of safety (well when you are a kid…) but I used to have this recurring semi-fear that when I got home reality would have shifted around me and I just wasn’t going to see what I expected: I was going back to a home that wasn’t mine any more, and in fact in this reality it had never been so because I had never existed. I had a mantra: Right time, right place, in time and space. It must have worked.

Looking back now I think that it is something to do with my father dying suddenly. I remember being taken to school by someone else and then my mother telling us that he was dead when we came back in the afternoon. I didn’t believe it until my aunt smiled a weird smile at me when I ran away to the back garden. Fucking hell, this was my first experience of impermanence, and it must have hung over me for ever after that. My eight year old mind realised that all of everything is a dream where we agree on the vocabulary but not what really hides behind the labels.

One of those weaks

Been having a lot of trouble sleeping properly. Suspect I’m a bit stressed, IBS flared up.

Got my generated J2EE code to compile with no problem, now I need to devise some kind of test harness and then move on to (finally) generating the JSPs for the data entry. JDev won’t display the file directories correctly. Need to av a fink abaht why.

Then it’ll only be a case of rolling it out onto the main site, and sorting out the hosting. Trivial. (I wish)

This week I’ve been playing with Oracle Advanced Queueing, which seemed easy enough to set up if you only want to work within the same database. I decided to change my implementation so that it sends a structured object with some surrounding data as well as the XML, decided to send the XML in a CLOB as the xmldom package has a parseclob method and I didn’t need to send a ready parsed doc so that was OK. I didn’t use sys.xmltype in the end. I like the way that the xmltype queues can have filters based on xpath expressions but don’t really need it at the moment.

That said I need a worked example that shows how to get queues to replicate across databases. I will put one up here if I ever find one that goes beyond vague hints with no examples in the manual.

Diary

Rosie and the kids came up to Nottingham Wed pm and stayed at the B&B with me. They had fun playing in Sherwood forest and the Robin Hood centre (which is on Maid Marion Way – nuff said). They had a good time and we celebrated Jon’s birthday. We had a bit of a mare finding somewhere to eat ‘cos the local pub were having a 45 minute wait so we drove to Mansfield and went to Pizza Hut, which was OK. It looks like Thursday is going out day in Nottingham, the pubs near Blidworth where we were staying were packed to the rafters. Got him a pretty cool Scooby Doo cake. He used his money to get one of those Tyco stunt bikes at TRU, wouldn’t buy the heavy parental thing about inventors really needing to get into Meccano.

Discovered that I will be paid for some of last month but still suffering from agency and umbrella company timeline mismatch. Never mind, bank co-operative and payday at the end of November should sort it aht.

My incompetent former employer still haven’t managed to send me my P45, it’s only been what, 5 weeks? If I didn’t know they were totally useless and lazy I’d think that there was something dodgy going on. On the other hand one of the guys who was made redundant in the first wave never got his P45 so maybe there is something there? It just doesn’t feel likely, it would require imagination and wit and they ain’t got none. When I emailed I got the usual bullshit. Of course, having been paid now, the P45 is a bit irrelevant except it stops me going on an emergency tax code and why should they worry that their idle bollocks costs me money? I’m only a human being and they are a suit-infested buncha nobodies who don’t deserve the intelligence and goodwill of their very able underpaid staff. Apparently a certain person is coming in clean shaven. Not sure what he can do about the ineffectual geek bit, though. I mean, it was like being made redundant by Wurzel Gummidge, (ah the scent of burning bridges: FYTP). Buddhists should be feeling compassion rather than contempt and I think I’ve crossed that bridge, but it was funny, shoulda slipped him a quid for a cup of tea. I make no pretense at my own sartorial splendour, but then again I do wear a suit for interviews and appraisals.

Sofa

Apparently I’ve been replaced with a second hand sofa. Good to know your true value, I say. (Missed out the MD’s brand new Jag as well for ironic purposes).

Music

Enjoying the new Starsailor in the car. I like the Stereophonics new one too, except that a couple of tracks are king irritating (Madame Helga springs to mind). I want the REM best of but not yet.

Spiritual stuff

Trying to get up at 6 am so’s I can get half an hour’s meditation in. Very hard when sleep is eluding you.

Routes

Went north and then across country today. Avoided the M6 but found the windy road from Buxton down to Macclesfield a bit of a trial. 2.5 hours, which is about .5 quicker than the M6 route. I think the A50 route is probably still the best for Mondays ‘cos I’ll be hitting Macc and so on around 7 going the other way and it will be getting busy.

Blessings all.</p