Re: SmartFrog question...
Steve Loughran <[email protected]> Thu, 17 May 2007 11:08:26 +0100
| Newsgroups | gmane.comp.java.smartfrog.user |
|---|---|
| Message-ID | <[email protected]> |
On 17/05/07, Kevin Jackson <[email protected]> wrote: > Hi Steve, > > Sorry to bother you at work, but I'm trying to build up our automated > deployment with SmartFrog and I've encountered something that I'm not > sure it's possible to resolve currently. Kevin, You are welcome to send sf support calls to me at work. I'd recommend you get on the smartfrog dev or support mail list, because there are other people who can answer them too. > > I have a custom JDBCRealm for Tomcat that must be deployed into > tomcat/lib (with Tomcat6). > > Now I can deploy JDBC drivers to the same location as they are > available in the maven/ibiblio repo, but my tomcat-realm-1.0-SNAPSHOT > is only available in my local repo. > > So I have > > Server: with tomcat installed, needs jars from my local repo, running > SmartFrog demon > > Client: with local m2 repo with all required jars (my custom ones and > standard jdbc drivers) > > When I run sfStart <server> test linux_config.sf > > SmartFrog on the server tries to get the jars from the ibiblio repo. > How can I 'send' the jars in my local repo to the server via > SmartFrog? It looks like Maven2Library is still beta and as such > doesn't have much documentation or examples, but from what I gather, aah, that's my code isnt it? Its not really beta, its got tests, its got source, just not enough docs. Actually there is some ivy stuff that's new and testless, but that's just a different layout policy...all the underlying code is the same. -the Library stuff can pull stuff down from local or remote repositories, using any policy to describe remote stuff, and the same or a different policy for local file layout. That lets me fetch from m2, store under ivy, etc. -you can tweak caching policy to control how often we look for updated artifacts -you can make the download synchronous or async. Async stops your deployment blocking for a while, but makes it harder to wait for the result -you set a destination in the copyTo attribute (either a path or a ref to a FileUsingComponent), to where the artifact will be copied on deploy. so even with an async download you can trigger a synchronous copy. -the maven2 library defaults to using the ibiblio repository, but can be set up to use a local file or http repository. Setting up an m2 repository with the jetty component should be pretty simple, even if I haven't set up an example of that yet. > the way around this problem is to setup a private maven repo which > includes all our custom jars and then get SmartFrog to use that > instead of the ibiblio repo. 1. You may be able to use it alongside the main one; I will check. 2. we support filesystem repositories too -if you have a shared FS then stuff is simple. ***Tell me where your local repo is (in the filesys or HTTP) and I will do an example library configuration to retrieve from it** > > Another option would of course to setup SmartFrog so that the required > jars are copied over to the server first via Ant's <scp> and then > SmartFrog won't need to download them. 1. We tend to use network shares, but it does rely on the shares having the same name everywhere. 2. Smartfrog daemons themselves support an RMI-style network classloader, so you can force download new components by deploying a component descriptor with an sfClasspath attribute ...all things that are deployed from that level down get the new classpath. This lets you do dynamic component deployment, but doesnt help with setting up TC6. 3. There's a LocalFilestore component, with an implementation behind it: org.smartfrog.services.filesystem.filestore.LocalFilestore This is something I've used for long-haul publishing, where you push up an artifact with metadata and a URI, and it gets saved at the far end (RMI isn't the long haul API used, some SOAPy thing BTW). So you can store stuff locally. I could imagine a component that is a bit like this that lets you publish stuff to a local library cache. I say imagine as it isnt there yet and I am not going to write it this week -I'm trying to get a release out the way and I've been building a pretty complex process using ivy and izpack, and now people want RPMs. your .deb antlib will come in handy in future too. > > Any ideas or examples of doing something similar to this? > > Thanks and sorry to bug you at work. We encourage users, and on the mail lists provide free support to internal and external customers. Your use of the tool is appreciated. Part of our team (Ritu and Kumar) are in India, which is closer TZ-wise to your place of employment. also, we caught a presentation at apachecon that mentioned a POJO API for managing Tomcat 6, though I havent seen the details yet...it should be something we can manage directly. Otherwise there is the JMX component. -steve -- ----------------------- Hewlett-Packard Limited Registered Office: Cain Road, Bracknell, Berks RG12 1HN Registered No: 690597 England ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/