Does anyone know any good resources that I could use to learn how to make HTTP calls through an Entity Bean or use MQ Series through an Entity Bean?
We are currently exploring the possibility of using Entity Beans to communicate with a backend SAP system using XML. I would like to either use MQ series or make straight HTTP calls through an Entity Bean, but I am not sure how possible or difficult it is.
Thanks for your help.
I'm not sure exactly what you are asking, but Java is Java. If you can write the Java code to make MQ api calls, then you can put this code inside a method defined for your entity bean.
Something seems wrong about the question though, what is the relationship between the entity bean and the backend system?
Does the entity bean represent persistent data persisted by the back end?
It usually makes more sense to represent the backend system as a set of functions/methods exposed through a session bean.
The backend system is SAP, which does not have a datasource, per se. It is accessible only through HTTP XML posts. So I am trying to decide whether it is wise to use Entity Beans to access these functions or a Session Bean.
More importantly, I am wondering whether there are Entity or Session beans that exist already to either use MQ Series messaging or to use HTTP posting to persist data.
In other words, I'd like to know if anyone has used a Bean to post an XML document over HTTP either directly or using a messaging system? If it was an Entity Bean, the ejbStore and ejbLoad methods would perform the XML calls to the legacy system. If it was a Session Bean, then I would simply define custom methods to perform the XML calls.
Does that make more sense? I apologize if I am not making perfect sense. I just learned EJBs last week. :)
There are several companies that make J2EE Connectors for SAP. I'm not sure if the interface is entity or session beans, but you might want to check them out:
J2EE connectors are neither entity nor session beans, they are connectors.
You could consider any one of the following approaches
1. According to EJB2.0 spec there is "Integration with JavaTM Message Service (JMS) -- Asynchronous Capabilities Streamline Systems". This means that there is something called Message Driven Beans but this is a very new type of bean and I am not sure if the app servers yet support EJB 2.0
2. If you are not using application server then you can use JMS ( Java Messaging Service, which is what we are doing) to talk to MQ Series from plain old java programs,