Mailing List
Home
Forum Home
Maven - Project building tool
Axis - Java SOAP implementation
Cocoon - MVC web framework based on XML/XSL
Lucene - Full-featured text search engine APIs
Fop - Create PDF, PCL, PS, SVG, XML driven by XSL formatting objects.
Log4J - A log library
POI - Java Excel, Word and other Microsoft Office files manipulating library
Oracle database error code ...
Subjects
log4j warning: No appenders could be found
java security AccessControlException: access denied (java io FilePermission clie
java lang InstantiationException: org apache tools ant Main
Apache Axis Tutorial
Struts <logic iterate >
log4j properties How to parse outpu to multiple files
configuring log4j with BEA Weblogic 8 1
How to use XSL FOP Java together
JSP precompile
Servlet File Download dialog problem (IE6,Adobe 6 0)
Proposal: Adding jar manifest classpath in jar and war plugins
Unsupported major minor version 48 0 problem while running the an
   telope task
java security AccessControlException: access denied (java io FilePermission
axis wsdl2java Ant Task usage
net sf hibernate MappingException: Error reading resource: test/User hbm xml
Building EAR ANT Script for websphere 5 0
CREATING WAR Files
jsp data into Excel
Classpath problem
Jboss 3 2 3+ vs Tomcat Axis Question
RE: How to include jars and add them into the MANIFEST MF/Class Path
attribute
Printing problem
InstantiationException
Couldn 't find trusted certificate
Please : How can one install ant 1 6 0 under Eclipse 2 1 ?
Excel: Too many different cell formats
Running junit tests fails
XDoclet, Struts and Maven: Where to start? SOLUTION
1 3 final: now giving me java io FileNotFoundException (Too many
open files)
AXIS: tomcat timeout ?
 
J2EE Support

J2EE Support

2006-06-17       - By Dennis Sosnoski

 Back
Reply:     1     2     3     4     5     6     7     8     9     10     >>  

Okay, so I guess what you're after is automatic deployment of EJBs as
web services. The alternative of making regular calls to the actual EJB
just involves using a proxy class which handles the EJB lookup and
forwards all calls on to the EJB. It  should be fairly easy to just
write a code generator to create these proxy classes. Even without
automatic proxy generation it seems extreme to say that Axis2 is not an
option, though.

 - Dennis

robert lazarski wrote:
>
>
> On 6/16/06, *Dennis Sosnoski* <dms@(protected)
> <mailto:dms@(protected)>> wrote:
>
>     robert lazarski wrote:
>     > <snip>
>     > Currently I'm integrating an EJB app with Axis2 - thankfully as any
>     > tomcat / servlet container web layer would. However, I came very
>     close
>     > to having to implement these services as EJB, which would have
>     > required either JAX-WS or Axis 1.x , as Axis2 just isn't an option.
>     >
>     >
>     I'm puzzled by this statement, Robert. Why is Axis2 not an option? You
>     just use the EJB interfaces to access the service classes, same as
>     any
>     other application using the EJBs.
>
>       - Dennis
>
>
>  
>
> I'm not 100% sure we are on the same page, so allow me to give an
> example - in JBoss 4.0.x using JSWDP databinding and axis 1.x - a
> strange hybrid but that's what JBoss supports:
>
> <enterprise-beans>
>   <session>
>     <ejb-name>MyWebService</ejb-name>
>     <ejb-class>org.MyWebService</ejb-class>
>     <session-type>Stateless</session-type>
>     <ejb-ref>
>         <!-- SoapSession is a stateful session bean -->
>         <ejb-ref-name>ejb/SoapSession</ejb-ref-name>
>         <ejb-ref-type>Session</ejb-ref-type>
>         <home>org.SoapSessionHome</home>
>         <remote>org.SoapSession</remote>
>     </ejb-ref>
>     ...
>    <session>
>  </enterprise-beans>
>  
> import javax.ejb.SessionBean Source code of javax.ejb.SessionBean;
> import javax.ejb.SessionContext Source code of javax.ejb.SessionContext;
>
> public class MyWebService implements SessionBean {
>
>     private SessionContext ctx;
>    
>     public ReturnWeb_Login web_Login(
>                         String user_name,
>                         String user_password) throws RemoteException {
>
>                 Integer successErrorCode = Messages_Codes.FAILURE;
>                 String soap_session_id  = null;
>                 Connection con = null;
>
>                 try {
>                        con = getConnection();
>                        successErrorCode = CallCentreDAO.login(con,
> call_centre_id,
>                                  user_name, user_password, this);
>
>                        if(Messages_Codes.SUCCESS == successErrorCode) {
>                          SoapSession soapSession =
> serviceLocator.getSoapSessionHome().create();
>                          soapSession.setTimestamp(
> Calendar.getInstance() );
>                          soap_session_id =
> serviceLocator.getSoapSession_Id(soapSession);
>
>                        } else {
>                          successErrorCode =
> Messages_Codes.AuthorizationFailed;
>                        }
>                 } catch(Exception ex) {
>                         ctx.setRollbackOnly();
>                         successErrorCode = Messages_Codes.FAILURE;
>                 } finally {
>                         if(con!=null)
>                                 try{con.close();}catch(SQLException ex){};
>                 }
>
>                 return new ReturnWeb_Login (
> Messages_Codes.get(successErrorCode), successErrorCode.intValue(),
> soap_session_id, user_name);
> }
>
> So what this does is allow EJB transactions in a web service - notice  
> ctx.setRollbackOnly() ,  and a soap session managed by the EJB
> container via a stateful session bean.
>
> OK, so why can you _not_ do this with Axis2 ?
>
> 1) JBoss modified axis 1.x to support ejb transactions:
>
> http://wiki.jboss.org/wiki/Wiki.jsp?page=WebServiceStacks
>
> JBossWS4EE <http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossWS4EE> is
> J2EE-1.4 compliant and available starting from jboss-4 (See http://oss-4.ora-code.com).0.0. It relies
> on a modified version of axis-1 (See http://xis-1.ora-code.com).1. This stack should no longer be used.
>
> 2) JBoss now is pushing JBossWS, based seemingly largely - but not
> entirely - on JAX-WS. Its spec support and completion status are here:
>
> http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossWSSpecStatus
>
> 3) Most importantly: "Any stack not listed above is *not supported*."
>
> So just to be clear: You can use Axis2 with EJB just fine as long as
> you do not want to have the ServiceClass implement SessionBean - this
> is at least true for JBoss. I think everyone agrees you can invoke an
> EJB anywhere anytime in any container as any web layer class would.
>
> Now it would be interesting to try to implement the scenerio above
> with JBoss and Axis2 since the sources are open. However, (A) It'd be
> a labor of love and I just don't see feel it (B) JBoss is GPL and
> axis2 is Apache licenesed of course, and (C)  It'd be unsupported by
> JBoss and even if it did work, the sanity of such a scenerio is
> rightfully questioned by sanjiva and many others.
>
> Cheers,
> Robert
> http://www.braziloutsource.com/

-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
To unsubscribe, e-mail: axis-user-unsubscribe@(protected)
For additional commands, e-mail: axis-user-help@(protected)