The Artima Developer Community
Sponsored Link

Agile Buzz Forum
Replicating from a Workspace

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
James Robertson

Posts: 29924
Nickname: jarober61
Registered: Jun, 2003

David Buck, Smalltalker at large
Replicating from a Workspace Posted: Feb 2, 2006 9:20 AM
Reply to this message Reply

This post originated from an RSS feed registered with Agile Buzz by James Robertson.
Original Post: Replicating from a Workspace
Feed Title: Travis Griggs - Blog
Feed URL: http://www.cincomsmalltalk.com/rssBlog/travis-rss.xml
Feed Description: This TAG Line is Extra
Latest Agile Buzz Posts
Latest Agile Buzz Posts by James Robertson
Latest Posts From Travis Griggs - Blog

Advertisement

I tried a new tact to code replication yesterday. I thought I'd just see if I could skip the StoreForGlorpVWUI package and do it directly with the tools provided (I'm not a fan of all the disparate stuff StoreForGlorpVWUI adds in).

Loading just StoreForGlorpReplication was very pleasant. The only "why is that in there?" I noticed was OracleEXDI. It was a marked improvement over loading the other package. The loaded nicely, I wouldn't have gotten very far without some wonderful help from Alan Knight, the main author or Glorp. Glorp is good and I like it. The more I use it, the more it impresses me. And Alan's always very helpful. Too bad it doesn't have a catchy name like the Ruby stuff does for Rails. "Smalltalk with Glorp" just doesn't sound as elegant as "Ruby on Rails." I digress.

Replicating a package between two repositories is a bit longish, but it's very straightforward. Here's an example:

sr := StoreReplicator new.

"setup the source login"
login := Login new.
login database: PostgreSQLPlatform new.
login username: 'xp'.
login password: ''.
login connectString: 'puffin.keyww.com_teamw'.
login schema: ''. "you do this for PostGreSQL, other platforms, you actually put something here"
login name: 'Key'.

"create a session around the login, add it to the replicators"
session := GlorpSession new.
session system: (StoreDescriptorSystem forPlatform: login database).
session accessor: (DatabaseAccessor forLogin: login).
session login.
sr sourceSession: session.

"rinse/repeat for the target"
login := Login new.
login database: PostgreSQLPlatform new.
login username: 'tgriggs'.
login password: ''.
login connectString: 'store.cincomsmalltalk.com:5432_store_public'.
login schema: ''.
login name: 'OR'.

session := GlorpSession new.
session system: (StoreDescriptorSystem forPlatform: login database).
session accessor: (DatabaseAccessor forLogin: login).
session login.
sr targetSession: session.

"tell the replicator to replicate the latest and all versions backwards from it and then replicate a package or two"
sr replicateRecursively: true.
sr replicatePackageNamed: 'StoreExtensions'

Read: Replicating from a Workspace

Topic: Writing Good User Stories Previous Topic   Next Topic Topic: Look after your product backlog

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use