You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Steven <st...@assurant.com> on 2006/08/10 23:35:11 UTC

Hello World

Is there a "hello world" example out there for ServiceMix?  Something that
shows me in code how to work with ServiceMix.  There's one for Mule and it
was very helpful to me.  I'm struggling with many errors - from simple
start-up to every example thus far.  I'm really bummed because the web docs
seem pretty easy - yet I'm unable to get even one example to work (and I'm
following the directions exactly).  Unless the directions leave out  needed
steps, I fail to see how anyone can get it working.  Why?  Because I started
with a fresh install of Java 1.4.2, installed ServiceMix, and it doesn't
work on my system (for whatever reason).  I'm sure it's a setup issue on my
system, but I'm stuck on what it might be.  Still, ServiceMix looks cool
enough to continue the struggle.


-- 
View this message in context: http://www.nabble.com/Hello-World-tf2087343.html#a5753012
Sent from the ServiceMix - User forum at Nabble.com.


Re: Hello World

Posted by Terry Cox <te...@meta-concepts.com>.
> Seems like a good oportunity for
> someone to write a book: "Real World ServiceMix Solutions"  Any 
> takers?

Well, I am working on the book, so I'll let you know, but in the 
meantime, I think you will find that once you actually start to use the 
framework, the documentation provided and the questions addressed via 
the forum are more than enough to get a team of developers up to speed 
very quickly.

Terry


Re: Hello World

Posted by pradeep <pr...@gmail.com>.
Steven,

I am having been experimenting with ServiceMix for about 2 weeks  and I
agree with points raised by you. Most of documentation work is IN PROGRESS
because of which newbies like me find it difficult to understand things
quickly. Posting queries in the forum helps but not all questions get
answered making things difficult. Like Terry said the best way to understand
ServiceMix is going through the code but is tough if we have less time.

Pradeep


Steven wrote:
> 
> 
> Although I agree in general, the problem is I simply don't have time to
> read someone else's code to learn how to use their product.  I work in an
> office where SOA is being considered and I'm just trying to put together a
> small example of how ServiceMix could be used.  From my newbie
> perspective, if you haven't been in the SOA/messaging game for a while,
> all of the info out there is written from a point of view of the reader
> knowing what's going on - which I don't.  ;-)  
> 
> Luckily, the ServiceMix examples all work as expected once you get past a
> couple of hurdles (proxy servers, ant and proxy servers, etc. etc.).  The
> best example I've found thus far is the rss-binding example.  It's close
> to what I want to do.  This brings up another thing I've notice, there
> doesn't seem to be an info on how to use ServiceMix as a solution to a
> problem. For instance, as a newbie to ServiceMix I don't yet understand
> what I need to configure or build myself to get a stock quote from a
> service (via http) every five minutes, then cache those results, then
> allow clients to request the lastest results from the cache.  I know I
> could use the quartz and http components, but what else?  How do I cache
> the results.  What do I need to provide in terms of custom components,
> etc.  Unless you've been involved with ServiceMix for a while, this kind
> of solutions based info just isn't found - or at least, I can't find it. 
> Seems like a good oportunity for someone to write a book: "Real World
> ServiceMix Solutions"  Any takers?
> 
> 
> 
> 
> Terry wrote:
>> 
>>> No one seems willing to share
>>> "how" they learned what they learned.
>> 
>> Well, one of the neat things about ServiceMix is that big chunks of it 
>> are written using ServiceMix, so by looking at the source you get lots 
>> of examples of how to deal with all the basic patterns. Also, by 
>> following the example of the ServiceMix unit tests, you can build your 
>> own unit test suite to determine the behaviour of the container in 
>> situations that you can't find direct examples for.
>> 
>> Terry
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Hello-World-tf2087343.html#a6308135
Sent from the ServiceMix - User forum at Nabble.com.


Re: Hello World

Posted by Steven <st...@assurant.com>.

Although I agree in general, the problem is I simply don't have time to read
someone else's code to learn how to use their product.  I work in an office
where SOA is being considered and I'm just trying to put together a small
example of how ServiceMix could be used.  From my newbie perspective, if you
haven't been in the SOA/messaging game for a while, all of the info out
there is written from a point of view of the reader knowing what's going on
- which I don't.  ;-)  

Luckily, the ServiceMix examples all work as expected once you get past a
couple of hurdles (proxy servers, ant and proxy servers, etc. etc.).  The
best example I've found thus far is the rss-binding example.  It's close to
what I want to do.  This brings up another thing I've notice, there doesn't
seem to be an info on how to use ServiceMix as a solution to a problem. For
instance, as a newbie to ServiceMix I don't yet understand what I need to
configure or build myself to get a stock quote from a service (via http)
every five minutes, then cache those results, then allow clients to request
the lastest results from the cache.  I know I could use the quartz and http
components, but what else?  How do I cache the results.  What do I need to
provide in terms of custom components, etc.  Unless you've been involved
with ServiceMix for a while, this kind of solutions based info just isn't
found - or at least, I can't find it.  Seems like a good oportunity for
someone to write a book: "Real World ServiceMix Solutions"  Any takers?




Terry wrote:
> 
>> No one seems willing to share
>> "how" they learned what they learned.
> 
> Well, one of the neat things about ServiceMix is that big chunks of it 
> are written using ServiceMix, so by looking at the source you get lots 
> of examples of how to deal with all the basic patterns. Also, by 
> following the example of the ServiceMix unit tests, you can build your 
> own unit test suite to determine the behaviour of the container in 
> situations that you can't find direct examples for.
> 
> Terry
> 
> 

-- 
View this message in context: http://www.nabble.com/Hello-World-tf2087343.html#a6307822
Sent from the ServiceMix - User forum at Nabble.com.


Re: Hello World

Posted by Terry Cox <te...@meta-concepts.com>.
> No one seems willing to share
> "how" they learned what they learned.

Well, one of the neat things about ServiceMix is that big chunks of it 
are written using ServiceMix, so by looking at the source you get lots 
of examples of how to deal with all the basic patterns. Also, by 
following the example of the ServiceMix unit tests, you can build your 
own unit test suite to determine the behaviour of the container in 
situations that you can't find direct examples for.

Terry

Re: Hello World

Posted by Steven <st...@assurant.com>.
Thanks Eric, 

I've managed to get a much better understanding of SOA and ESB and
ServiceMix after reading several online articles.  I even tried the
rss-binding example but it failed because I'm behind a proxy server and I
can't find any info on how to configure for a proxy server.  This is
probably the biggest problem I personally have with ServiceMix - it's
increasingly difficult to figure out how to do something or even where to
look if you haven't been following ServiceMix for years.  As a newbie, it's
a huge pile of stuff I couldn't possiibly understand without help.  For
instance, almost every article talks about how to configure services,
bindings, etc. but doesn't tell me how they figured out what the settings
were or what things there were to configure in the first place. It's a
matter of giving me a fish vs. teaching me how to fish.  It seems to be a
common thing in documentation these days.  No one seems willing to share
"how" they learned what they learned.  They just share "what" one should do. 
It's not very effective.






Eric Düll-2 wrote:
> 
> Hi Steven,
> 
> there are several examples explained at the homepage... and yes, I also
> had my problems
> in getting the first example started. But now it works. :-)
> I just can tell you what I did..
> (1) get java 1.5.. make sure, that in your classpath is 1.5
> (2) get ant...
> (3) get the latest servicemix binary (!) edition.
> thats it.... browse to your servicemix folder[SF] and open examples.
> Nearly every example
> (one in each folder) uses the same steps.
> (4-1) [SF]\bin\servicemix [SF]\examples\http...\servicemix.xml
> [SF] is your folder... you start servicemix and tell the engine where
> your configuration file is.
> Every example has its own.
> (4-2) now servicemix works but in most cases its very boring just to
> stare at the engine... ;-) therefore
> you should start the example. Instead of typing "java myexample.class"
> you will have to use the ant
> command. There is a makefile in every folder that compiles your java
> files to classfiles, that will
> be executed automatically. Just browse into the example folder where the
> makefile is located and type
> "ant."
> 
> Best practice:
> Once you started your first example...browse to the servicemix homepage,
> click examples, choose one of those and follow the instructions and the
> online documentation.
> 
> Eric
> 
> 
> 
> 
> 
> Steven schrieb:
>> Is there a "hello world" example out there for ServiceMix?  Something
>> that
>> shows me in code how to work with ServiceMix.  There's one for Mule and
>> it
>> was very helpful to me.  I'm struggling with many errors - from simple
>> start-up to every example thus far.  I'm really bummed because the web
>> docs
>> seem pretty easy - yet I'm unable to get even one example to work (and
>> I'm
>> following the directions exactly).  Unless the directions leave out 
>> needed
>> steps, I fail to see how anyone can get it working.  Why?  Because I
>> started
>> with a fresh install of Java 1.4.2, installed ServiceMix, and it doesn't
>> work on my system (for whatever reason).  I'm sure it's a setup issue on
>> my
>> system, but I'm stuck on what it might be.  Still, ServiceMix looks cool
>> enough to continue the struggle.
>>
>>
>>
> 
> --
> Eric Düll
> 
> Innovations GmbH       http://www.innovations.de
> Ziegelei 7             eric.duell@innovations.de
> D-88090 Immenstaad     Tel: 0 75 45 / 202-332
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Hello-World-tf2087343.html#a6305900
Sent from the ServiceMix - User forum at Nabble.com.


Re: Hello World

Posted by Eric Düll <Er...@innovations.de>.
Hi Steven,

there are several examples explained at the homepage... and yes, I also 
had my problems
in getting the first example started. But now it works. :-)
I just can tell you what I did..
(1) get java 1.5.. make sure, that in your classpath is 1.5
(2) get ant...
(3) get the latest servicemix binary (!) edition.
thats it.... browse to your servicemix folder[SF] and open examples. 
Nearly every example
(one in each folder) uses the same steps.
(4-1) [SF]\bin\servicemix [SF]\examples\http...\servicemix.xml
[SF] is your folder... you start servicemix and tell the engine where 
your configuration file is.
Every example has its own.
(4-2) now servicemix works but in most cases its very boring just to 
stare at the engine... ;-) therefore
you should start the example. Instead of typing "java myexample.class" 
you will have to use the ant
command. There is a makefile in every folder that compiles your java 
files to classfiles, that will
be executed automatically. Just browse into the example folder where the 
makefile is located and type
"ant."

Best practice:
Once you started your first example...browse to the servicemix homepage,
click examples, choose one of those and follow the instructions and the 
online documentation.

Eric





Steven schrieb:
> Is there a "hello world" example out there for ServiceMix?  Something that
> shows me in code how to work with ServiceMix.  There's one for Mule and it
> was very helpful to me.  I'm struggling with many errors - from simple
> start-up to every example thus far.  I'm really bummed because the web docs
> seem pretty easy - yet I'm unable to get even one example to work (and I'm
> following the directions exactly).  Unless the directions leave out  needed
> steps, I fail to see how anyone can get it working.  Why?  Because I started
> with a fresh install of Java 1.4.2, installed ServiceMix, and it doesn't
> work on my system (for whatever reason).  I'm sure it's a setup issue on my
> system, but I'm stuck on what it might be.  Still, ServiceMix looks cool
> enough to continue the struggle.
>
>
>   

-- 
Eric Düll

Innovations GmbH       http://www.innovations.de
Ziegelei 7             eric.duell@innovations.de
D-88090 Immenstaad     Tel: 0 75 45 / 202-332