You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by puli <ra...@amritatech.com> on 2007/12/17 08:14:45 UTC

Little confused with the terminologies

dear ONS,
im a newbie to servicemix, and gone through the documents and the examples.
But the terminologies which is used in the documents are little confising
for me. 
i want to create a service which can do a somthing in a ejb.

For this where can i start of it. I tried many examples all are working but
for this assignement what all are i need.

Pls help me, i need to get some result for this immediatly

Thanx in advance
-- 
View this message in context: http://www.nabble.com/Little-confused-with-the-terminologies-tp14370114s12049p14370114.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Little confused with the terminologies

Posted by Bruce Snyder <br...@gmail.com>.
On Jan 4, 2008 9:27 PM, puli <ra...@amritatech.com> wrote:
>
> Thank you for your detailed reply...
>
> i will try this one and let you know about the status.
>
> do we really need to use spring or is there any other way to implement this.
> Just for the knowledge transfer i am asking this question.

You can implement it any way you like. I suggested using Spring
because ServiceMix is built on top of Spring so you can use Spring
easily inside of the xbean.xml files in SUs. In fact, just about
anything you can do in Spring you can do in a xbean.xml file. Also,
using the Spring EJB APIs to invoke EJBs is the easiest manner in
which I've ever seen it done. I started using it back in 2003 to
invoke remote EJBs as well as to simplify the creation of EJBs. IMO,
the Spring EJB APIs are incredibly easy to use and vastly superior to
any other method of working with EJB 2.x beans that I've seen. I can't
speak for EJB 3.x as I haven't used it much.

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache ActiveMQ - http://activemq.org/
Apache Camel - http://activemq.org/camel/
Apache ServiceMix - http://servicemix.org/
Apache Geronimo - http://geronimo.apache.org/

Blog: http://bruceblog.org/

Re: Little confused with the terminologies

Posted by puli <ra...@amritatech.com>.
Thank you for your detailed reply...

i will try this one and let you know about the status.

do we really need to use spring or is there any other way to implement this.
Just for the knowledge transfer i am asking this question.


> Yeah this is what i meant and Thanx for your response.
>
> Then can u help me how can i write the POJO call out to EJB. Is there any
> sample available anywhere?

I'd use the Spring EJB APIs to achieve this:

http://static.springframework.org/spring/docs/2.5.x/api/org/springframework/ejb/access/package-summary.html

For an example of using these APIs to invoke remote EJBs, see the
section named 'Accessing EJBs with Spring' in the following article:

http://www.javaworld.com/javaworld/jw-02-2005/jw-0214-springejb.html

The key is using the proxies to invoke the remote EJB.

> How can i write the client application?means how can i access the
> servicemix.

You will need to create some kind of Java application that will send a
XML message into the JBI container via some component. For example,
it's pretty easy to send messages using JMS so you could create a
small application that sends JMS messages to a JMS queue in the JBI
container and forwards the message along to your other components.
Below is an example component flow demonstrating this:

client application sends jms message --> servicemix-jms queue -->
(other components here) --> servicemix-bean POJO to invoke an EJB

This is just an example, but it's a good demonstration of how an EJB
can be invoked.

Bruce
-- 
perl -e 'print
unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache ActiveMQ - http://activemq.org/
Apache Camel - http://activemq.org/camel/
Apache ServiceMix - http://servicemix.org/
Apache Geronimo - http://geronimo.apache.org/

Blog: http://bruceblog.org/



-- 
View this message in context: http://www.nabble.com/Little-confused-with-the-terminologies-tp14370114s12049p14629906.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Little confused with the terminologies

Posted by Bruce Snyder <br...@gmail.com>.
On Jan 4, 2008 8:58 AM, puli <ra...@amritatech.com> wrote:
>
>
> Yeah this is what i meant and Thanx for your response.
>
> Then can u help me how can i write the POJO call out to EJB. Is there any
> sample available anywhere?

I'd use the Spring EJB APIs to achieve this:

http://static.springframework.org/spring/docs/2.5.x/api/org/springframework/ejb/access/package-summary.html

For an example of using these APIs to invoke remote EJBs, see the
section named 'Accessing EJBs with Spring' in the following article:

http://www.javaworld.com/javaworld/jw-02-2005/jw-0214-springejb.html

The key is using the proxies to invoke the remote EJB.

> How can i write the client application?means how can i access the
> servicemix.

You will need to create some kind of Java application that will send a
XML message into the JBI container via some component. For example,
it's pretty easy to send messages using JMS so you could create a
small application that sends JMS messages to a JMS queue in the JBI
container and forwards the message along to your other components.
Below is an example component flow demonstrating this:

client application sends jms message --> servicemix-jms queue -->
(other components here) --> servicemix-bean POJO to invoke an EJB

This is just an example, but it's a good demonstration of how an EJB
can be invoked.

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache ActiveMQ - http://activemq.org/
Apache Camel - http://activemq.org/camel/
Apache ServiceMix - http://servicemix.org/
Apache Geronimo - http://geronimo.apache.org/

Blog: http://bruceblog.org/

Re: Little confused with the terminologies

Posted by puli <ra...@amritatech.com>.

Yeah this is what i meant and Thanx for your response.

Then can u help me how can i write the POJO call out to EJB. Is there any
sample available anywhere?

How can i write the client application?means how can i access the
servicemix.

plz help me.



bsnyder wrote:
> 
> On Jan 3, 2008 11:17 PM, puli <ra...@amritatech.com> wrote:
>>
>> Pls tel me if im wrong,
>>
>> I wrote an ejb code and i have deployed it to jboss. The i have to write
>> service which will make a POJO call to the ejb. Then i have to write a
>> client application which can be servlet or anything which will give a
>> request for the service which we have created.
>>
>> If im wrong pls tell me the right way. If you have any other easier
>> solution
>> also pls enlighten with that one.
> 
> This is a correct assessment. Based on what you described, you will
> create a component flow that looks like this:
> 
> client application --> smx-bean pojo --> JBoss EJB
> 
> Is this correct?
> 
> Bruce
> -- 
> perl -e 'print
> unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
> );'
> 
> Apache ActiveMQ - http://activemq.org/
> Apache Camel - http://activemq.org/camel/
> Apache ServiceMix - http://servicemix.org/
> Apache Geronimo - http://geronimo.apache.org/
> 
> Blog: http://bruceblog.org/
> 
> 

-- 
View this message in context: http://www.nabble.com/Little-confused-with-the-terminologies-tp14370114s12049p14619365.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Little confused with the terminologies

Posted by Bruce Snyder <br...@gmail.com>.
On Jan 3, 2008 11:17 PM, puli <ra...@amritatech.com> wrote:
>
> Pls tel me if im wrong,
>
> I wrote an ejb code and i have deployed it to jboss. The i have to write
> service which will make a POJO call to the ejb. Then i have to write a
> client application which can be servlet or anything which will give a
> request for the service which we have created.
>
> If im wrong pls tell me the right way. If you have any other easier solution
> also pls enlighten with that one.

This is a correct assessment. Based on what you described, you will
create a component flow that looks like this:

client application --> smx-bean pojo --> JBoss EJB

Is this correct?

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache ActiveMQ - http://activemq.org/
Apache Camel - http://activemq.org/camel/
Apache ServiceMix - http://servicemix.org/
Apache Geronimo - http://geronimo.apache.org/

Blog: http://bruceblog.org/

Re: Little confused with the terminologies

Posted by puli <ra...@amritatech.com>.
Pls tel me if im wrong,

I wrote an ejb code and i have deployed it to jboss. The i have to write
service which will make a POJO call to the ejb. Then i have to write a
client application which can be servlet or anything which will give a
request for the service which we have created.

If im wrong pls tell me the right way. If you have any other easier solution
also pls enlighten with that one.



bsnyder wrote:
> 
> On Dec 19, 2007 10:45 PM, puli <ra...@amritatech.com> wrote:
>>
>> me created a su with the sericemix-bean component..
>> but again having doubt..
>> how can i do a POJO callout to EJB...
>> do i need to deploy ejb also to servicemix or i have to deploy it
>> somewhere
>> else?
>> where should i and how?
>> can u pls help me out..
> 
> You can make a call out to an EJB that is hosted external to
> ServiceMix via the POJO that you created that extends the
> MessageExchangeListener. In this POJO, you can use the Spring
> Framework APIs to make a call out to the externally hosted EJB. See
> the Spring Javadocs for more info:
> 
> http://static.springframework.org/spring/docs/2.5.x/api/org/springframework/ejb/access/package-summary.html
> 
> Bruce
> -- 
> perl -e 'print
> unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
> );'
> 
> Apache ActiveMQ - http://activemq.org/
> Apache Camel - http://activemq.org/camel/
> Apache ServiceMix - http://servicemix.org/
> Apache Geronimo - http://geronimo.apache.org/
> 
> Blog: http://bruceblog.org/
> 
> 

-- 
View this message in context: http://www.nabble.com/Little-confused-with-the-terminologies-tp14370114s12049p14611475.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Little confused with the terminologies

Posted by Bruce Snyder <br...@gmail.com>.
On Dec 19, 2007 10:45 PM, puli <ra...@amritatech.com> wrote:
>
> me created a su with the sericemix-bean component..
> but again having doubt..
> how can i do a POJO callout to EJB...
> do i need to deploy ejb also to servicemix or i have to deploy it somewhere
> else?
> where should i and how?
> can u pls help me out..

You can make a call out to an EJB that is hosted external to
ServiceMix via the POJO that you created that extends the
MessageExchangeListener. In this POJO, you can use the Spring
Framework APIs to make a call out to the externally hosted EJB. See
the Spring Javadocs for more info:

http://static.springframework.org/spring/docs/2.5.x/api/org/springframework/ejb/access/package-summary.html

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache ActiveMQ - http://activemq.org/
Apache Camel - http://activemq.org/camel/
Apache ServiceMix - http://servicemix.org/
Apache Geronimo - http://geronimo.apache.org/

Blog: http://bruceblog.org/

Re: Little confused with the terminologies

Posted by puli <ra...@amritatech.com>.
me created a su with the sericemix-bean component..
but again having doubt..
how can i do a POJO callout to EJB...
do i need to deploy ejb also to servicemix or i have to deploy it somewhere
else?
where should i and how?
can u pls help me out..


gnodet wrote:
> 
> I've began to work on that for ServiceMix 4.0, but this is not finished
> and
> not yet usable.
> You'll have to wait a couple more months, so I suggest you use spring
> remoting meanwhile as indicated by Gert.
> 
> On Dec 19, 2007 6:18 AM, puli <ra...@amritatech.com> wrote:
> 
>>
>> Thax for ur response
>>
>> Is that Sevicemix 4.0 released, if so from where i can get it?
>> now im using servicemix3.2. how can i give a POJO callout to EJB.
>> can u please explain, sorry if i am asking silly Q's coz i am new to this
>> area
>>
>>
>> pls help...
>>
>>
>>
>> Gert Vanthienen wrote:
>> >
>> > L.S.,
>> >
>> > If you have gone through the tutorials, you already know how to create
>> a
>> > SU/SA and deploy that I suppose.  With ServiceMix 4, you will be able
>> to
>> > deploy EJB right into ServiceMix and expose them on the bus. 
>> ServiceMix
>> > 3.x doesn't support this scenario yet however.
>> >
>> > For the moment, a possible solution could be to write a SU targeted at
>> > the servicemix-bean component and have your POJO call out to the EJB.
>> > Keep in mind that the xbean.xml file is just a Spring XML file, so you
>> > can leverage Spring's support for integrating with EJBs in there as
>> well
>> > (have a look at the 'Accessing EJBs' part of the Spring manual).
>> >
>> > Regards,
>> >
>> > Gert
>> >
>> > puli wrote:
>> >> dear ONS,
>> >> im a newbie to servicemix, and gone through the documents and the
>> >> examples.
>> >> But the terminologies which is used in the documents are little
>> confising
>> >> for me.
>> >> i want to create a service which can do a somthing in a ejb.
>> >>
>> >> For this where can i start of it. I tried many examples all are
>> working
>> >> but
>> >> for this assignement what all are i need.
>> >>
>> >> Pls help me, i need to get some result for this immediatly
>> >>
>> >> Thanx in advance
>> >>
>> >
>> >
>> >
>> > -----
>> > ---
>> > Gert Vanthienen
>> > http://www.anova.be
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Little-confused-with-the-terminologies-tp14370114s12049p14411417.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> 
> 

-- 
View this message in context: http://www.nabble.com/Little-confused-with-the-terminologies-tp14370114s12049p14431167.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Little confused with the terminologies

Posted by Guillaume Nodet <gn...@gmail.com>.
I've began to work on that for ServiceMix 4.0, but this is not finished and
not yet usable.
You'll have to wait a couple more months, so I suggest you use spring
remoting meanwhile as indicated by Gert.

On Dec 19, 2007 6:18 AM, puli <ra...@amritatech.com> wrote:

>
> Thax for ur response
>
> Is that Sevicemix 4.0 released, if so from where i can get it?
> now im using servicemix3.2. how can i give a POJO callout to EJB.
> can u please explain, sorry if i am asking silly Q's coz i am new to this
> area
>
>
> pls help...
>
>
>
> Gert Vanthienen wrote:
> >
> > L.S.,
> >
> > If you have gone through the tutorials, you already know how to create a
> > SU/SA and deploy that I suppose.  With ServiceMix 4, you will be able to
> > deploy EJB right into ServiceMix and expose them on the bus.  ServiceMix
> > 3.x doesn't support this scenario yet however.
> >
> > For the moment, a possible solution could be to write a SU targeted at
> > the servicemix-bean component and have your POJO call out to the EJB.
> > Keep in mind that the xbean.xml file is just a Spring XML file, so you
> > can leverage Spring's support for integrating with EJBs in there as well
> > (have a look at the 'Accessing EJBs' part of the Spring manual).
> >
> > Regards,
> >
> > Gert
> >
> > puli wrote:
> >> dear ONS,
> >> im a newbie to servicemix, and gone through the documents and the
> >> examples.
> >> But the terminologies which is used in the documents are little
> confising
> >> for me.
> >> i want to create a service which can do a somthing in a ejb.
> >>
> >> For this where can i start of it. I tried many examples all are working
> >> but
> >> for this assignement what all are i need.
> >>
> >> Pls help me, i need to get some result for this immediatly
> >>
> >> Thanx in advance
> >>
> >
> >
> >
> > -----
> > ---
> > Gert Vanthienen
> > http://www.anova.be
> >
>
> --
> View this message in context:
> http://www.nabble.com/Little-confused-with-the-terminologies-tp14370114s12049p14411417.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/

Re: Little confused with the terminologies

Posted by puli <ra...@amritatech.com>.
Thax for ur response

Is that Sevicemix 4.0 released, if so from where i can get it?
now im using servicemix3.2. how can i give a POJO callout to EJB.
can u please explain, sorry if i am asking silly Q's coz i am new to this
area


pls help...



Gert Vanthienen wrote:
> 
> L.S.,
> 
> If you have gone through the tutorials, you already know how to create a 
> SU/SA and deploy that I suppose.  With ServiceMix 4, you will be able to 
> deploy EJB right into ServiceMix and expose them on the bus.  ServiceMix 
> 3.x doesn't support this scenario yet however.
> 
> For the moment, a possible solution could be to write a SU targeted at 
> the servicemix-bean component and have your POJO call out to the EJB.  
> Keep in mind that the xbean.xml file is just a Spring XML file, so you 
> can leverage Spring's support for integrating with EJBs in there as well 
> (have a look at the 'Accessing EJBs' part of the Spring manual).
> 
> Regards,
> 
> Gert
> 
> puli wrote:
>> dear ONS,
>> im a newbie to servicemix, and gone through the documents and the
>> examples.
>> But the terminologies which is used in the documents are little confising
>> for me. 
>> i want to create a service which can do a somthing in a ejb.
>>
>> For this where can i start of it. I tried many examples all are working
>> but
>> for this assignement what all are i need.
>>
>> Pls help me, i need to get some result for this immediatly
>>
>> Thanx in advance
>>   
> 
> 
> 
> -----
> ---
> Gert Vanthienen
> http://www.anova.be
> 

-- 
View this message in context: http://www.nabble.com/Little-confused-with-the-terminologies-tp14370114s12049p14411417.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Little confused with the terminologies

Posted by Gert Vanthienen <ge...@skynet.be>.
L.S.,

If you have gone through the tutorials, you already know how to create a 
SU/SA and deploy that I suppose.  With ServiceMix 4, you will be able to 
deploy EJB right into ServiceMix and expose them on the bus.  ServiceMix 
3.x doesn't support this scenario yet however.

For the moment, a possible solution could be to write a SU targeted at 
the servicemix-bean component and have your POJO call out to the EJB.  
Keep in mind that the xbean.xml file is just a Spring XML file, so you 
can leverage Spring's support for integrating with EJBs in there as well 
(have a look at the 'Accessing EJBs' part of the Spring manual).

Regards,

Gert

puli wrote:
> dear ONS,
> im a newbie to servicemix, and gone through the documents and the examples.
> But the terminologies which is used in the documents are little confising
> for me. 
> i want to create a service which can do a somthing in a ejb.
>
> For this where can i start of it. I tried many examples all are working but
> for this assignement what all are i need.
>
> Pls help me, i need to get some result for this immediatly
>
> Thanx in advance
>