Author Topic: MDA Transformation for EJB  (Read 2179 times)

ringle.lai

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
MDA Transformation for EJB
« on: January 11, 2006, 08:25:50 am »
Product: EA 6.0.781
Problem description:
1. When I transfer a class to EJB, the private method in our source class will generate to Remote Interface. That's not make sense.
2. The Bean Class must be implement the method declared in Remote Interface.
Solution:
I've been modified these three transformation type.
1. Class__EJBSessionBean:
   .....
   %list="Operation__EJBRemoteInterface" @separator="\n\n" @indent="  "%
%list="Operation" @separator="\n" @indent="  "%

2. Operation:

%if opScope=="public" or opScope=="Public"%
%endTemplate%
Operation
{
 %TRANSFORM_CURRENT("type")%
 type=%qt%%CONVERT_TYPE("Java",opReturnType)%%qt%
%list="Parameter" @separator="\n" @indent="  "%
}

3. Operation__EJBRemoteInterface:

%if opScope!="public" and opScope!="Public"%
%endTemplate%
Operation
{
 name=%qt%%opName%%qt%
 type=%qt%%opReturnType%%qt%
 scope="Public"
 Tag
 {
   name="throws"
   value="java.rmi.RemoteException"
 }
%list="Parameter" @separator="\n" @indent="  "%
}