Johannes Kleinlercher wrote:
> Hi all,
> 
> I am very impressed of the idea and concept of smartfrog.
> However, after reading lots of documentation I didn't get a clue how
> to extend smartfrog
> to our own needs.
> What if I have a WebSphere Application Server and I want to do the
> configuration management
> with smartfrog? As I understand I have to write my own smartfrog
> component.

Hello Johannes.

There's two ways to do things
(1) custom Java components
(2) take and extend the existing components, using them in new compound 
objects

The first of these gives you the most control, but is also the hardest 
work. Taking some existing  stuff is a lot easier

for the problem of WSAS, you can probably divide the problem up

-Starting WebSphere with the right classpath and JVM options
-deploying WAR and EAR files
-checking the health of the web application

to check the health, the LivenessPage component can be deployed to issue 
HTTP GETs on a regular basis
/org/smartfrog/services/www/livenessPage.sf

To deploy WAR/EAR files, the DeployByCopy components do all the heavy 
lifting: they copy files to the relevant directory on startup, delete 
them when terminated:
/org/smartfrog/services/www/dbc/components.sf

This leaves the app server itself. We don't have a custom component for 
that, the way we do with Jetty. Instead you have to either use the Cargo 
components (assuming Cargo can work with WebSphere), or just use the 
Java component to bring up WebSphere. This is how we bring things like 
JBoss up; it works very well:

/org/smartfrog/services/www/servers/jboss4.sf

(these are all in the sf-www component bundle; the smartfrog-www RPM, 
and documented in the wiki: 
http://wiki.smartfrog.org/wiki/display/sf/sf-www )


> I also understand that with the smartfrogs declarative language I
> define how a component should be
> configured and then it changes the configuration the way that it
> should be. If a component is already
> configured this way it does nothing. Okay in theory, but somehow I
> have to program this compare and configure
> and I have to provide websphere scripts or a websphere API do
> configure websphere, isn't it?

You could actually start the native scripts, but then you need to use 
the RunShell component to hook everything up, and do some work to get 
any component values (such as environment variables) down to the 
process. If you can get away with the Java command, that is the one to 
go for.

> 
> Did I miss something or how do I implement a extension for WebSphere?
> 

Start with the Java command to run WebSphere and use the DeployByCopy 
component to deploy web applications to the relevant directory. Send us 
email if things aren't working or something doesn't make sense, as that 
gives me an excuse to improve the documentation. Writing WebSphere 
support in a new component is harder work and something you should hold 
off doing until you are sure that you really need it.

Servuss,

-steve

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Smartfrog-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/smartfrog-users

Reply via email to