Re: [AXIS2] J2EE Support
Just had a major issue when using both ws sessions and authentication with jboss as. The first call on a session worked, but the second method came from the ws on another thread so the jboss securityassociation was lost. I have hacked a simple solution into EJBProvider which looks up the home again (or just do a IC.rebind and cause reauthentication) and creates a securityassociation local on the current thread. The second call works from there. Warren Crossing wrote: I use axis1-4 for ws based auth and session management, this ties directly into my sessionbean using the providers and handlers from axis1-4. If the context has a session then it talks to the same session bean serviceobject. If the context has credentials then they are passed into jni to look up the ejb service object. What I hope get from this architecture is container based transaction and security support without exposing transactions or neccessarily security through the wsdl. I could add another handler to map security etc.. I noticed when the session is reaped on timeout that remove() is not called on the session bean. I might clone EJBProvider and implement ServiceLifecycle so I can call remove() on the destroy() event. So why go to this effort in architecture to essentially pass the buck to the next component? I am essentially exposing a call-control sip stack through the ws. I have no place to do any core logic, or event routing, in the ws layer or in the stack as they both maintain session state and transactions in completley different ways, ie cookies and dialogs. What I really want is a transactional context to say detect the call has ended ! debit close the session and modify some database state, handle failure case, make endpoint callbacks etc which I can't get from the sip stack (aka black box) and don't trust the web server to do (reliably). Another reason is I automagically get pooling of service objects. Sure I have to authenticate twice a session, once in the ws and once in jni - ejb, but I don't have to worry about dos and cross host usage. I don't really need session failover but that's another point for the ejb container (if supported). I also get ejb timers facility and concurrency and synchronization. So I think its a win for coupling the two architectures togeather. IMHO WS is not an application framework it's just another remoting/messaging technology primarily for .NET and monkey JEE interop. Otherwise why not just use IIOP? It's much faster! =) Interested in your feedback. [EMAIL PROTECTED] wrote: Hi, axis 1 2 work in a J2EE environment Michel Lequim -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andrew Lindley Sent: Friday, June 16, 2006 11:54 AM To: axis-user@ws.apache.org Subject: [AXIS2] J2EE Support I was just wondering, why neither AXIS, nor AXIS2 do support J2EE - is this correct? JBoss e.g. has this feature. Is this information correct? thanks, - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [AXIS2] J2EE Support
I use axis1-4 for ws based auth and session management, this ties directly into my sessionbean using the providers and handlers from axis1-4. If the context has a session then it talks to the same session bean serviceobject. If the context has credentials then they are passed into jni to look up the ejb service object. What I hope get from this architecture is container based transaction and security support without exposing transactions or neccessarily security through the wsdl. I could add another handler to map security etc.. I noticed when the session is reaped on timeout that remove() is not called on the session bean. I might clone EJBProvider and implement ServiceLifecycle so I can call remove() on the destroy() event. So why go to this effort in architecture to essentially pass the buck to the next component? I am essentially exposing a call-control sip stack through the ws. I have no place to do any core logic, or event routing, in the ws layer or in the stack as they both maintain session state and transactions in completley different ways, ie cookies and dialogs. What I really want is a transactional context to say detect the call has ended ! debit close the session and modify some database state, handle failure case, make endpoint callbacks etc which I can't get from the sip stack (aka black box) and don't trust the web server to do (reliably). Another reason is I automagically get pooling of service objects. Sure I have to authenticate twice a session, once in the ws and once in jni - ejb, but I don't have to worry about dos and cross host usage. I don't really need session failover but that's another point for the ejb container (if supported). I also get ejb timers facility and concurrency and synchronization. So I think its a win for coupling the two architectures togeather. IMHO WS is not an application framework it's just another remoting/messaging technology primarily for .NET and monkey JEE interop. Otherwise why not just use IIOP? It's much faster! =) Interested in your feedback. [EMAIL PROTECTED] wrote: Hi, axis 1 2 work in a J2EE environment Michel Lequim -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andrew Lindley Sent: Friday, June 16, 2006 11:54 AM To: axis-user@ws.apache.org Subject: [AXIS2] J2EE Support I was just wondering, why neither AXIS, nor AXIS2 do support J2EE - is this correct? JBoss e.g. has this feature. Is this information correct? thanks, - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [SPAM] - Re: [AXIS2] J2EE Support - Message is from an unknown sender
Dennis Sosnoski , Why do you want to expose ejb's as webservices directly ?not all methods in ejb has to be exposed as webservices operations right.In this case it better to right wrappers to the ejb methods and expose that wrappers class as webservice. Do you have any advantages exposing ejb to as webservices - was wondering why weblogic , jboss has such an option. -Original Message- From: Dennis Sosnoski [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 20, 2006 4:38 AM To: axis-user@ws.apache.org Subject: [SPAM] - Re: [AXIS2] J2EE Support - Message is from an unknown sender I think there are really two different approaches possible for handling EJB web services. The first is what I think you're focused on, automatic exposure of EJBs as web services using annotations or the like. AFAIKS, this really needs to be implemented by the app server framework because that controls both the class loading (you need hooks into the class loading to see the annotations in the first place) and the EJB deployment. The second is what I was suggesting, which is to have the service implementation basically function as a proxy to the actual EJB. This means that the service implementation is just another client of the service as far as the app server is concerned. The actual proxy code could be generated by an Axis2 add-on. If you run Axis2 inside the app server, the overhead of accessing the EJB in this way will be minimal; if you run it outside the app server you'll have more overhead (as with any EJB client), but you'll gain the flexibility of keeping your web services support on a standard servlet engine rather than an app server. Both these approaches work, but the first one (which includes JSR-109 support) can really only be implemented by the people running the app server. JAX-WS doesn't require an app server so can be integrated directly into Axis2 - but AFAIK it doesn't give you automatic EJB support. - Dennis Dennis M. Sosnoski SOA, Web Services, and XML Training and Consulting http://www.sosnoski.com - http://www.sosnoski.co.nz Seattle, WA +1-425-296-6194 - Wellington, NZ +64-4-298-6117 robert lazarski wrote: Well, so far in the developement of axis2 best as I can tell, for good reasons, there has not been a pragmatic discussion of Axis2 and pure EJB services, ie, a ServiceClass implementing SessionBean. I'd like to think what I was trying to imply was that currently (A) no one has a working case and documentation supporting it, (B) there is a corner case demand for it, and (C) I have an itch to scatch to support clients who simply want it. So far Axis2 has no 'code generator to create these proxy classes' . So how do we get there? Perhaps with JSR-109 - the 109 specification now also supports JAX-WS which is a follow-on specification to JAX-RPC - and the JAX-WS support in Axis2 recently, maybe that's the way to go. Comments? Robert http://www.braziloutsource.com/ On 6/18/06, Dennis Sosnoski [EMAIL PROTECTED] classesosnoski.com wrote: 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* [EMAIL PROTECTED] mailto:[EMAIL 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-nameMyWebService/ejb-name ejb-classorg.MyWebService/ejb-class session-typeStateless/session-type ejb-ref !-- SoapSession is a stateful session bean -- ejb-ref-nameejb/SoapSession/ejb-ref-name ejb-ref-typeSession/ejb-ref-type homeorg.SoapSessionHome/home remoteorg.SoapSession/remote /ejb-ref ... session /enterprise-beans import javax.ejb.SessionBean; import javax.ejb.SessionContext; public class MyWebService implements SessionBean { private SessionContext ctx
Re: [SPAM] - Re: [AXIS2] J2EE Support - Message is from an unknown sender
I'm not actually the one concerned with exposing EJBs as web services. I agree that the proxy or wrapper class approach is the best way to approach the problem, though. - Dennis Dhakshinamoorthy, Hariharasudhan wrote: Dennis Sosnoski , Why do you want to expose ejb's as webservices directly ?not all methods in ejb has to be exposed as webservices operations right.In this case it better to right wrappers to the ejb methods and expose that wrappers class as webservice. Do you have any advantages exposing ejb to as webservices - was wondering why weblogic , jboss has such an option. -Original Message- From: Dennis Sosnoski [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 20, 2006 4:38 AM To: axis-user@ws.apache.org Subject: [SPAM] - Re: [AXIS2] J2EE Support - Message is from an unknown sender I think there are really two different approaches possible for handling EJB web services. The first is what I think you're focused on, automatic exposure of EJBs as web services using annotations or the like. AFAIKS, this really needs to be implemented by the app server framework because that controls both the class loading (you need hooks into the class loading to see the annotations in the first place) and the EJB deployment. The second is what I was suggesting, which is to have the service implementation basically function as a proxy to the actual EJB. This means that the service implementation is just another client of the service as far as the app server is concerned. The actual proxy code could be generated by an Axis2 add-on. If you run Axis2 inside the app server, the overhead of accessing the EJB in this way will be minimal; if you run it outside the app server you'll have more overhead (as with any EJB client), but you'll gain the flexibility of keeping your web services support on a standard servlet engine rather than an app server. Both these approaches work, but the first one (which includes JSR-109 support) can really only be implemented by the people running the app server. JAX-WS doesn't require an app server so can be integrated directly into Axis2 - but AFAIK it doesn't give you automatic EJB support. - Dennis Dennis M. Sosnoski SOA, Web Services, and XML Training and Consulting http://www.sosnoski.com - http://www.sosnoski.co.nz Seattle, WA +1-425-296-6194 - Wellington, NZ +64-4-298-6117 robert lazarski wrote: Well, so far in the developement of axis2 best as I can tell, for good reasons, there has not been a pragmatic discussion of Axis2 and pure EJB services, ie, a ServiceClass implementing SessionBean. I'd like to think what I was trying to imply was that currently (A) no one has a working case and documentation supporting it, (B) there is a corner case demand for it, and (C) I have an itch to scatch to support clients who simply want it. So far Axis2 has no 'code generator to create these proxy classes' . So how do we get there? Perhaps with JSR-109 - the 109 specification now also supports JAX-WS which is a follow-on specification to JAX-RPC - and the JAX-WS support in Axis2 recently, maybe that's the way to go. Comments? Robert http://www.braziloutsource.com/ On 6/18/06, Dennis Sosnoski [EMAIL PROTECTED] classesosnoski.com wrote: 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* [EMAIL PROTECTED] mailto:[EMAIL 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-nameMyWebService/ejb-name ejb-classorg.MyWebService/ejb-class session-typeStateless/session-type ejb-ref !-- SoapSession is a stateful session bean -- ejb-ref-nameejb/SoapSession/ejb-ref-name ejb-ref-typeSession/ejb-ref-type homeorg.SoapSessionHome/home remoteorg.SoapSession/remote /ejb-ref
Re: [SPAM] - Re: [AXIS2] J2EE Support - Message is from an unknown sender
Exposing an EJB as a web service can have several advantages: - Less classes: exposure as a web service can be achieved by other methods than specific proxy classes, and this may lead to a smaller footprint. - Better integration with app server authentication and other mechanisms. You have to manually apply the correct handlers to add security, addressing, policy, transactions, etc, and program what to do on errors in each of these layers. An app server can automatically apply them when/where needed. - The flexibility of being able to put your web service proxies in a simpler servlet engine is often not a desired feature. In many cases it will be preferable to add a node to the app server cluster than wasting a machine with a servlet engine, that after all will also need to be replicated in order to maintain the same service level than EJBs have. Separating the proxies to a different machine adds costs in hardware and maintenance, and introduces additional connectivity errors. Having them in the same app server than EJBs removes these costs. - It gives you a reasonably easy way to access a J2EE server through firewalls that only allows HTTP/S connections, without having to spend time in an alternative interface. If you say this is not the right approach in the long term, I agree with you. I think web services are more effectively used when they are built from the ground, taking into account their specific characteristics. But if your EJBs already publish a reasonable API, this allows you to extend your J2EE services to other languages (almost) without extra effort/cost. Hope this helps, Rodrigo Ruiz Dhakshinamoorthy, Hariharasudhan wrote: Dennis Sosnoski , Why do you want to expose ejb's as webservices directly ?not all methods in ejb has to be exposed as webservices operations right.In this case it better to right wrappers to the ejb methods and expose that wrappers class as webservice. Do you have any advantages exposing ejb to as webservices - was wondering why weblogic , jboss has such an option. -Original Message- From: Dennis Sosnoski [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 20, 2006 4:38 AM To: axis-user@ws.apache.org Subject: [SPAM] - Re: [AXIS2] J2EE Support - Message is from an unknown sender I think there are really two different approaches possible for handling EJB web services. The first is what I think you're focused on, automatic exposure of EJBs as web services using annotations or the like. AFAIKS, this really needs to be implemented by the app server framework because that controls both the class loading (you need hooks into the class loading to see the annotations in the first place) and the EJB deployment. The second is what I was suggesting, which is to have the service implementation basically function as a proxy to the actual EJB. This means that the service implementation is just another client of the service as far as the app server is concerned. The actual proxy code could be generated by an Axis2 add-on. If you run Axis2 inside the app server, the overhead of accessing the EJB in this way will be minimal; if you run it outside the app server you'll have more overhead (as with any EJB client), but you'll gain the flexibility of keeping your web services support on a standard servlet engine rather than an app server. Both these approaches work, but the first one (which includes JSR-109 support) can really only be implemented by the people running the app server. JAX-WS doesn't require an app server so can be integrated directly into Axis2 - but AFAIK it doesn't give you automatic EJB support. - Dennis Dennis M. Sosnoski SOA, Web Services, and XML Training and Consulting http://www.sosnoski.com - http://www.sosnoski.co.nz Seattle, WA +1-425-296-6194 - Wellington, NZ +64-4-298-6117 robert lazarski wrote: Well, so far in the developement of axis2 best as I can tell, for good reasons, there has not been a pragmatic discussion of Axis2 and pure EJB services, ie, a ServiceClass implementing SessionBean. I'd like to think what I was trying to imply was that currently (A) no one has a working case and documentation supporting it, (B) there is a corner case demand for it, and (C) I have an itch to scatch to support clients who simply want it. So far Axis2 has no 'code generator to create these proxy classes' . So how do we get there? Perhaps with JSR-109 - the 109 specification now also supports JAX-WS which is a follow-on specification to JAX-RPC - and the JAX-WS support in Axis2 recently, maybe that's the way to go. Comments? Robert http://www.braziloutsource.com/ On 6/18/06, Dennis Sosnoski [EMAIL PROTECTED] classesosnoski.com wrote: 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
Re: [AXIS2] J2EE Support
I think there are really two different approaches possible for handling EJB web services. The first is what I think you're focused on, automatic exposure of EJBs as web services using annotations or the like. AFAIKS, this really needs to be implemented by the app server framework because that controls both the class loading (you need hooks into the class loading to see the annotations in the first place) and the EJB deployment. The second is what I was suggesting, which is to have the service implementation basically function as a proxy to the actual EJB. This means that the service implementation is just another client of the service as far as the app server is concerned. The actual proxy code could be generated by an Axis2 add-on. If you run Axis2 inside the app server, the overhead of accessing the EJB in this way will be minimal; if you run it outside the app server you'll have more overhead (as with any EJB client), but you'll gain the flexibility of keeping your web services support on a standard servlet engine rather than an app server. Both these approaches work, but the first one (which includes JSR-109 support) can really only be implemented by the people running the app server. JAX-WS doesn't require an app server so can be integrated directly into Axis2 - but AFAIK it doesn't give you automatic EJB support. - Dennis Dennis M. Sosnoski SOA, Web Services, and XML Training and Consulting http://www.sosnoski.com - http://www.sosnoski.co.nz Seattle, WA +1-425-296-6194 - Wellington, NZ +64-4-298-6117 robert lazarski wrote: Well, so far in the developement of axis2 best as I can tell, for good reasons, there has not been a pragmatic discussion of Axis2 and pure EJB services, ie, a ServiceClass implementing SessionBean. I'd like to think what I was trying to imply was that currently (A) no one has a working case and documentation supporting it, (B) there is a corner case demand for it, and (C) I have an itch to scatch to support clients who simply want it. So far Axis2 has no 'code generator to create these proxy classes' . So how do we get there? Perhaps with JSR-109 - the 109 specification now also supports JAX-WS which is a follow-on specification to JAX-RPC - and the JAX-WS support in Axis2 recently, maybe that's the way to go. Comments? Robert http://www.braziloutsource.com/ On 6/18/06, Dennis Sosnoski [EMAIL PROTECTED] classesosnoski.com wrote: 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* [EMAIL PROTECTED] mailto:[EMAIL 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-nameMyWebService/ejb-name ejb-classorg.MyWebService/ejb-class session-typeStateless/session-type ejb-ref !-- SoapSession is a stateful session bean -- ejb-ref-nameejb/SoapSession/ejb-ref-name ejb-ref-typeSession/ejb-ref-type homeorg.SoapSessionHome/home remoteorg.SoapSession/remote /ejb-ref ... session /enterprise-beans import javax.ejb.SessionBean; import 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,orner call_centre_id, user_name, user_password, this); if(Messages_Codes.SUCCESS == successErrorCode) { SoapSession
Re: [AXIS2] J2EE Support
Well, so far in the developement of axis2 best as I can tell, for good reasons, there has not been a pragmatic discussion of Axis2 and pure EJB services, ie, a ServiceClass implementing SessionBean. I'd like to think what I was trying to imply was that currently (A) no one has a working case and documentation supporting it, (B) there is a corner case demand for it, and (C) I have an itch to scatch to support clients who simply want it. So far Axis2 has no 'code generator to create these proxy classes' . So how do we get there? Perhaps with JSR-109 - the 109 specification now also supports JAX-WS which is a follow-on specification to JAX-RPC - and the JAX-WS support in Axis2 recently, maybe that's the way to go. Comments? Robert http://www.braziloutsource.com/ On 6/18/06, Dennis Sosnoski [EMAIL PROTECTED] classesosnoski.com wrote: 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* [EMAIL PROTECTED] mailto:[EMAIL 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-nameMyWebService/ejb-name ejb-classorg.MyWebService/ejb-class session-typeStateless/session-type ejb-ref !-- SoapSession is a stateful session bean -- ejb-ref-nameejb/SoapSession/ejb-ref-name ejb-ref-typeSession/ejb-ref-type homeorg.SoapSessionHome/home remoteorg.SoapSession/remote /ejb-ref ... session /enterprise-beans import javax.ejb.SessionBean; import 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,orner 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.0.0. It relies on a modified version of axis-1.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)
Re: [AXIS2] J2EE Support
Kool stuff, hope it work out. Cheers, Robert http://www.braziloutsource.com/ On 6/18/06, Chathura Herath [EMAIL PROTECTED] wrote: JSR 109 tries to do exacly this, i.e. adding the web services stack to the J2ee applications. I was part of the JSR109/ AXIS1/Geronimo integration effort. There is a summer of code project listed on doing the same for Axis2. http://wiki.apache.org/general/SummerOfCode2006 No idea whether there is any progress on it. On 6/17/06, robert lazarski [EMAIL PROTECTED] wrote: On 6/16/06, Dennis Sosnoski [EMAIL 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-nameMyWebService/ejb-name ejb-classorg.MyWebService/ejb-class session-typeStateless/session-type ejb-ref !-- SoapSession is a stateful session bean -- ejb-ref-nameejb/SoapSession/ejb-ref-name ejb-ref-typeSession/ejb-ref-type homeorg.SoapSessionHome/home remoteorg.SoapSession/remote /ejb-ref ... session /enterprise-beans import javax.ejb.SessionBean; import 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 is J2EE-1.4 compliant and available starting from jboss-4.0.0. It relies on a modified version of axis-1.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/ -- Chathura Herath http://people.apache.org/~chathura/ http://chathurah.blogspot.com/
Re: [AXIS2] J2EE Support
On 6/16/06, Dennis Sosnoski [EMAIL 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? Youjust 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-nameMyWebService/ejb-name ejb-classorg.MyWebService/ejb-class session-typeStateless/session-type ejb-ref !-- SoapSession is a stateful session bean -- ejb-ref-nameejb/SoapSession/ejb-ref-name ejb-ref-typeSession/ejb-ref-type homeorg.SoapSessionHome/home remoteorg.SoapSession/remote /ejb-ref ... session /enterprise-beans import javax.ejb.SessionBean; import 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 is J2EE-1.4 compliant and available starting from jboss-4.0.0. It relies on a modified version of axis-1.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/
Re: [AXIS2] J2EE Support
JSR 109 tries to do exacly this, i.e. adding the web services stack to the J2ee applications. I was part of the JSR109/ AXIS1/Geronimo integration effort. There is a summer of code project listed on doing the same for Axis2. http://wiki.apache.org/general/SummerOfCode2006 No idea whether there is any progress on it. On 6/17/06, robert lazarski [EMAIL PROTECTED] wrote: On 6/16/06, Dennis Sosnoski [EMAIL 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-nameMyWebService/ejb-name ejb-classorg.MyWebService/ejb-class session-typeStateless/session-type ejb-ref !-- SoapSession is a stateful session bean -- ejb-ref-nameejb/SoapSession/ejb-ref-name ejb-ref-typeSession/ejb-ref-type homeorg.SoapSessionHome/home remoteorg.SoapSession/remote /ejb-ref ... session /enterprise-beans import javax.ejb.SessionBean; import 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 is J2EE-1.4 compliant and available starting from jboss-4.0.0. It relies on a modified version of axis-1.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/ -- Chathura Herath http://people.apache.org/~chathura/ http://chathurah.blogspot.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [AXIS2] J2EE Support
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* [EMAIL PROTECTED] mailto:[EMAIL 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-nameMyWebService/ejb-name ejb-classorg.MyWebService/ejb-class session-typeStateless/session-type ejb-ref !-- SoapSession is a stateful session bean -- ejb-ref-nameejb/SoapSession/ejb-ref-name ejb-ref-typeSession/ejb-ref-type homeorg.SoapSessionHome/home remoteorg.SoapSession/remote /ejb-ref ... session /enterprise-beans import javax.ejb.SessionBean; import 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.0.0. It relies on a modified version of axis-1.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: [EMAIL
[AXIS2] J2EE Support
I was just wondering, why neither AXIS, nor AXIS2 do support J2EE - is this correct? JBoss e.g. has this feature. Is this information correct? thanks, -- --- Mag. Andrew Lindley ARC Seibersdorf research GmbH Research Studios Austria Studio Digital Memory Engineering Thurngasse 8/20, A-1090 Wien T. +43.1.585-0537 F. +43.1.585-3741 [EMAIL PROTECTED] www.arcs.ac.at - dme.researchstudio.at - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [AXIS2] J2EE Support
Hi, axis 1 2 work in a J2EE environment Michel Lequim -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andrew Lindley Sent: Friday, June 16, 2006 11:54 AM To: axis-user@ws.apache.org Subject: [AXIS2] J2EE Support I was just wondering, why neither AXIS, nor AXIS2 do support J2EE - is this correct? JBoss e.g. has this feature. Is this information correct? thanks, -- --- Mag. Andrew Lindley ARC Seibersdorf research GmbH Research Studios Austria Studio Digital Memory Engineering Thurngasse 8/20, A-1090 Wien T. +43.1.585-0537 F. +43.1.585-3741 [EMAIL PROTECTED] www.arcs.ac.at - dme.researchstudio.at - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] = = = = = = = = = = = = = = = = = = = = = = = = = Fortis Bank disclaimer : http://www.fortisbank.be/legal/disclaimer.htm Fortis Bank privacy policy : http://www.fortisbank.be/legal/privacy_policy.htm = = = = = = = = = = = = = = = = = = = = = = = = = - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [AXIS2] J2EE Support
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 [EMAIL PROTECTED] wrote: Hi, axis 1 2 work in a J2EE environment I believe the original question was a misunderstanding of what J2EE and axis are or do. JBoss is a web server that implements the J2EE standard, but also includes axis so webservices are implemented easily. Axis just provides the framework for webservices to work in any java-based webserver. - -- Don't worry about people stealing an idea. If it's original, you will have to ram it down their throats. Howard Aiken James Black[EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFEkqfMikQgpVn8xrARA6TOAJ9vGyt8LfE82gnUk8uPxnEwSgRzcgCbBgyr 4LH8rUQkSZP/7S2qYkuPNwo= =ITbr -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [AXIS2] J2EE Support
My interpretation of the original question was why does Axis2 not support such features of the J2EE as Enterprise Java Beans (EJB 3.0 specifically), annotations, persistence etc.? Personally, I think Axis2 offers a more transparent view of what is going on behind the scenes than the J2EE version 5 approach...but then again annotations are kind of handy :-) GH From: James Black [EMAIL PROTECTED] Reply-To: axis-user@ws.apache.org To: axis-user@ws.apache.org Subject: Re: [AXIS2] J2EE Support Date: Fri, 16 Jun 2006 08:45:00 -0400 -BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 [EMAIL PROTECTED] wrote: Hi, axis 1 2 work in a J2EE environment I believe the original question was a misunderstanding of what J2EE and axis are or do. JBoss is a web server that implements the J2EE standard, but also includes axis so webservices are implemented easily. Axis just provides the framework for webservices to work in any java-based webserver. - -- Don't worry about people stealing an idea. If it's original, you will have to ram it down their throats. Howard Aiken James Black[EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFEkqfMikQgpVn8xrARA6TOAJ9vGyt8LfE82gnUk8uPxnEwSgRzcgCbBgyr 4LH8rUQkSZP/7S2qYkuPNwo= =ITbr -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [AXIS2] J2EE Support
GOBE HOBONA wrote: My interpretation of the original question was why does Axis2 not support such features of the J2EE as Enterprise Java Beans (EJB 3.0 specifically), annotations, persistence etc.? Axis2 supporting EJBs? My mind started malfunctioning :). ..The approach of taking a J2EE application server and shoving a Web Services layer in front of is not the right way to go about implementing a services platform.. - Sanjiva Weerawarana (http://www.internetnews.com/dev-news/article.php/3612491) I think the reason for people asking this kind of questions is that the J2EE providers have done exactly what Sanjiva had mentioned. So people think EJBs should be supported inside a web service engine. -- Chinthaka signature.asc Description: OpenPGP digital signature
Re: [AXIS2] J2EE Support
While I agree completely, I have in fact been _required_ to implement stateless session EJB's as Web Services using Axis 1.x under JBoss. The idea is that you can do your DB transactions and rollbacks inside those services, while hooking the service to a ejb-ref that is _stateful_ which can have state and state timeout - all managed by a clusterable container. The important point is that as strange as this may seem to me and others, axis 1.x and JBoss supported it. Some DB type of people just like EJB transactions in Web Services, as do vendors with marketing budgets 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. For more on what JBoss supports for the sake of discussion: http://wiki.jboss.org/wiki/Wiki.jsp?page=WebServiceStacks Just my 2 cents, Robert http://www.braziloutsource.com/ On 6/16/06, Eran Chinthaka [EMAIL PROTECTED] wrote: GOBE HOBONA wrote: My interpretation of the original question was why does Axis2 not support such features of the J2EE as Enterprise Java Beans (EJB 3.0 specifically), annotations, persistence etc.? Axis2 supporting EJBs? My mind started malfunctioning :)...The approach of taking a J2EE application server and shoving a WebServices layer in front of is not the right way to go about implementing a services platform.. - Sanjiva Weerawarana(http://www.internetnews.com/dev-news/article.php/3612491)I think the reason for people asking this kind of questions is that the J2EE providers have done exactly what Sanjiva had mentioned. So peoplethink EJBs should be supported inside a web service engine.-- Chinthaka
Re: [AXIS2] J2EE Support
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 Dennis M. Sosnoski SOA, Web Services, and XML Training and Consulting http://www.sosnoski.com - http://www.sosnoski.co.nz Seattle, WA +1-425-296-6194 - Wellington, NZ +64-4-298-6117 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]