on 04-03-2006 2:30 PM
Hi
I am migrating a application from weblogic to SAP web AS sp 15 .Is it possible to extend one Message Driven bean from other Message driven bean
regards
rajesh kr
Hi Rajesh,
No it's not possible. Inheritance for EJB-s is not part of J2EE 1.3 which is the implemented J2EE version.
HTH
Peter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rajesh,
Such functionality is not standard and part of the specification. There is no such possibility in SAP WAS.
However it should be easy to achieve the same effect. Simply move the message processing code into a method "myOnMessage(Message m) and then invoke it from the two MDB-s for the two topics.
MDB1 {
public void onMessage(Message m){
myClass.myOnMesage(m);
}
}
HTH
Peter
Hi Rajesh,
Here is in more details what I meant. Just move the existing code in onMessage() from MDB1 to a new class - MyLogic or whatever. Pass it whatever parameters you are using - the message probably, or additionally javax.ejb.EJBContext if you are using some more advanced functionality.
Then call from your two MDB-s this new java method.
MDB1 {
public void onMessage(Message m) {
MyLogic myLogic = new MyLogic();
myLogic.onMessage(m);
}
}
MDB2 {
public void onMessage(Message m) {
MyLogic myLogic = new MyLogic();
myLogic.onMessage(m);
}
}
HTH
Peter
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.