cancel
Showing results for 
Search instead for 
Did you mean: 

EJB - MDB connection

Former Member
0 Kudos

Hi all,

I have a Session EJB that need to call to a Message Driven Bean, that last will call to other Session Bean that insert data into R3.

Now when i create the MDB, and deploy the EAR Proyect, return me a warning. Well, first that all, i need to learn how create a MDB to insert data from RFC to R3. Later i need to trough an Session EJB, call the MDB.

I'm new in this area, if some have a tutorial for dummies or know it, thanks

Regards,

Jorge.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Ok thanks, now are "connected" and "sending messages", but now, how can i see the added element into my queue, maybe using the visual administrator or using other tool???

Thanks in advance.

Jorge

Former Member
0 Kudos

Hi Jorge,

Monitoring over JMS Queue-s can be done programatically via the JMS API (javax.jms.QueueBrowser). Unfortunately the VA doesn't offer monitoring, however an arbitrary tool can do it. Here is one :

http://www.hermesjms.com/confluence/display/HJMS/SAP

Another option would be to directly query the server database -

select * from BC_JMSQUEUE and check that it is increasing.

However, please note that you can monitor the messages only if there are not consumed, i.e. once they are delivered to the MDB they will be deleted by the JMS provider.

HTH

Peter

Answers (1)

Answers (1)

Former Member
0 Kudos

First of all...

You never call a MDB explicitely...I mean you can not. A MDB has a method onMessage which gets invoked when a new message arrives onto the Queue or the Topic with which the MDB is associated to.

heres SAP help on how you create MDBs and deploy them on SAP Web AS

http://help.sap.com/saphelp_nw04/helpdata/en/55/8898af1b129b4b8a1b63acea61b465/content.htm

From within your MDB, you have two choices to connect to R/3 and execute the RFC to do whats reqd.

1. Configure JRA and use it to give a call to your R/3 system and do what you need.

http://help.sap.com/saphelp_nw04/helpdata/en/6f/1bd5caa85b11d6b28500508b5d5211/content.htm

2. In the second case additional setup on R/3 side would be reqd, in terms of Exposing the RFC as a web service. In NWDS then you create a deployable proxy and from onMessage of your MDB , call this deployable proxy.

For help on exposing the RFC as a webservice, check the E-learning section on SDN

https://www.sdn.sap.com/irj/sdn/elearn

and then web services subsection.

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/webcontent/uuid/3e2f3b5e-0501-0010-d39c-a3a8f... [original link is broken]

More on deployable proxies here--->

http://help.sap.com/saphelp_nw04/helpdata/en/2d/b9766df88f4a24967dae38cb672fe1/frameset.htm

so overall execution in your scenario would be

1. session bean is called

2. it looks up for the Queue / topic & sends msg

3. MDB associated with it gets invoked

4. MDB gives a call to the deployable proxy which in turns communicates with the RFC(web service version of it)

OR

MDB uses JRA architecture to call the RFC.

HTH