Re: Accessing ISIS Domain Services via EJB
Hi David and Ashwin and welcome to the users@isis.a.o mailing list. Is the intention for the EJBs to be part of the same webapp as the Isis application itself? If so, then it should be easy enough to access the Isis runtime as a headless application, as per [1] In other words, you just need to subclass AbstractIsisSessionTemplate and override doExecute(...). To execute, just instantiate and call execute(...); this is where you specify the user account to connect as (AuthenticationSession class). Your subclass can declare dependencies (using @Inject) and these will be injected automatically. If you want to simulate the UI, then use the WrapperFactory [2], [3] If I've misunderstood what you're trying to do, please say. Cheers Dan [1] http://isis.apache.org/guides/ug.html#_ug_headless-access [2] http://isis.apache.org/guides/rg.html#_rg_services-api_manpage-WrapperFactory [3] http://isis.apache.org/guides/ug.html#_ug_testing_integ-test-support_wrapper-factory PS: fyi, in some future release we intend to refactor the Isis framework so that all its components are just regular EJB beans; this should then avoid the requirement for the AbstractIsisSessionTemplate boilerplate. On 23 July 2015 at 20:52, David Harrison dharri...@psionline.com wrote: Hello, We are interested in integrating Apache ISIS Domain Services (and Domain Objects) in an existing application architecture, via EJB. We briefly investigated using the RESTful interface, but the HATEOAS (hypertext as the engine of application state) style of interacting with ISIS was a bit more involved than we feel comfortable using as this point in time. Is there a way to access ISIS Domain Services via EJB ? If someone can point me (and my colleagues) in the right direction, we would be grateful. Best Regards, David Harrison and Ashwin Shimpi Environment: Apache Tomee 1.6.2 and EJB 3 OpenJDK Java 1.8.0 Apache ISIS - latest version, 1.8.0
Re: Accessing ISIS Domain Services via EJB
Hi David, When you say via EJB do you mean that you want to front end ISIS application with session beans and invoke those from another application via remote EJB invocation? Are you are saying that you want to do that just because you want to avoid having to learn REST/Json? Or you are thinking you need to expose some coarse grained services via session beans as opposed to having to deal with the fine grained RO that would be the case if you didn't make use of ISIS View objects? Have you considered using using ISIS View objects (a view over the Domain layer) to achieve a coarse grained RO interface to match the granularity that you need? Or is it the case that you are required to wrap and use remote EJB invocation to enlist the ISIS based application service in a distributed managed transaction? But presumably because you were already considering using the RO interface, then this is not a requirement? I think more information about your architecture constraints and requirements is needed. Regards.David. On Friday, 24 July 2015 7:52 AM, David Harrison dharri...@psionline.com wrote: Hello, We are interested in integrating Apache ISIS Domain Services (and Domain Objects) in an existing application architecture, via EJB. We briefly investigated using the RESTful interface, but the HATEOAS (hypertext as the engine of application state) style of interacting with ISIS was a bit more involved than we feel comfortable using as this point in time. Is there a way to access ISIS Domain Services via EJB ? If someone can point me (and my colleagues) in the right direction, we would be grateful. Best Regards, David Harrison and Ashwin Shimpi Environment: Apache Tomee 1.6.2 and EJB 3 OpenJDK Java 1.8.0 Apache ISIS - latest version, 1.8.0
Re: Accessing ISIS Domain Services via EJB
These are good questions, David T., and I should have thought to ask them myself. David H. probably does mean accessing Isis remotely rather than my guess, accessing from a co-located EJB... On 24 July 2015 at 10:37, David Tildesley davo...@yahoo.co.nz wrote: Hi David, When you say via EJB do you mean that you want to front end ISIS application with session beans and invoke those from another application via remote EJB invocation? Are you are saying that you want to do that just because you want to avoid having to learn REST/Json? Or you are thinking you need to expose some coarse grained services via session beans as opposed to having to deal with the fine grained RO that would be the case if you didn't make use of ISIS View objects? Have you considered using using ISIS View objects (a view over the Domain layer) to achieve a coarse grained RO interface to match the granularity that you need? If this is the case, David H., then also be aware that in 1.9.0-SNAPSHOT we have improved content negotiation support, so you quick easily return any representation you want according to the client's Accept HTTP header and a suitable implementation of the ContentMappingService, [4], [5] Or is it the case that you are required to wrap and use remote EJB invocation to enlist the ISIS based application service in a distributed managed transaction? But presumably because you were already considering using the RO interface, then this is not a requirement? I think more information about your architecture constraints and requirements is needed. Regards.David. Thx Dan [4] http://isis.apache.org/guides/rg.html#_rg_services-spi_manpage-ContentMappingService [5] http://isis.apache.org/guides/ug.html#_ug_extending_restfulobjects-viewer On Friday, 24 July 2015 7:52 AM, David Harrison dharri...@psionline.com wrote: Hello, We are interested in integrating Apache ISIS Domain Services (and Domain Objects) in an existing application architecture, via EJB. We briefly investigated using the RESTful interface, but the HATEOAS (hypertext as the engine of application state) style of interacting with ISIS was a bit more involved than we feel comfortable using as this point in time. Is there a way to access ISIS Domain Services via EJB ? If someone can point me (and my colleagues) in the right direction, we would be grateful. Best Regards, David Harrison and Ashwin Shimpi Environment: Apache Tomee 1.6.2 and EJB 3 OpenJDK Java 1.8.0 Apache ISIS - latest version, 1.8.0 On 24 July 2015 at 10:37, David Tildesley davo...@yahoo.co.nz wrote: Hi David, When you say via EJB do you mean that you want to front end ISIS application with session beans and invoke those from another application via remote EJB invocation? Are you are saying that you want to do that just because you want to avoid having to learn REST/Json? Or you are thinking you need to expose some coarse grained services via session beans as opposed to having to deal with the fine grained RO that would be the case if you didn't make use of ISIS View objects? Have you considered using using ISIS View objects (a view over the Domain layer) to achieve a coarse grained RO interface to match the granularity that you need? Or is it the case that you are required to wrap and use remote EJB invocation to enlist the ISIS based application service in a distributed managed transaction? But presumably because you were already considering using the RO interface, then this is not a requirement? I think more information about your architecture constraints and requirements is needed. Regards.David. On Friday, 24 July 2015 7:52 AM, David Harrison dharri...@psionline.com wrote: Hello, We are interested in integrating Apache ISIS Domain Services (and Domain Objects) in an existing application architecture, via EJB. We briefly investigated using the RESTful interface, but the HATEOAS (hypertext as the engine of application state) style of interacting with ISIS was a bit more involved than we feel comfortable using as this point in time. Is there a way to access ISIS Domain Services via EJB ? If someone can point me (and my colleagues) in the right direction, we would be grateful. Best Regards, David Harrison and Ashwin Shimpi Environment: Apache Tomee 1.6.2 and EJB 3 OpenJDK Java 1.8.0 Apache ISIS - latest version, 1.8.0
Re: Accessing ISIS Domain Services via EJB
Hi, On Jul 24, 2015 12:38 PM, David Tildesley davo...@yahoo.co.nz wrote: Hi David, When you say via EJB do you mean that you want to front end ISIS application with session beans and invoke those from another application via remote EJB invocation? Are you are saying that you want to do that just because you want to avoid having to learn REST/Json? ^^ This made me smile :-) I'd say it is better to unlearn REST/JSON! Here is an article that express very well my thoughts on the abuse of REST/JSON: http://www.nurkiewicz.com/2015/07/restful-considered-harmful.html?m=1 EJBs have their own problems but using HTTP for internal/in-process communication is insane. Or you are thinking you need to expose some coarse grained services via session beans as opposed to having to deal with the fine grained RO that would be the case if you didn't make use of ISIS View objects? Have you considered using using ISIS View objects (a view over the Domain layer) to achieve a coarse grained RO interface to match the granularity that you need? Or is it the case that you are required to wrap and use remote EJB invocation to enlist the ISIS based application service in a distributed managed transaction? But presumably because you were already considering using the RO interface, then this is not a requirement? I think more information about your architecture constraints and requirements is needed. Regards.David. On Friday, 24 July 2015 7:52 AM, David Harrison dharri...@psionline.com wrote: Hello, We are interested in integrating Apache ISIS Domain Services (and Domain Objects) in an existing application architecture, via EJB. We briefly investigated using the RESTful interface, but the HATEOAS (hypertext as the engine of application state) style of interacting with ISIS was a bit more involved than we feel comfortable using as this point in time. Is there a way to access ISIS Domain Services via EJB ? If someone can point me (and my colleagues) in the right direction, we would be grateful. Best Regards, David Harrison and Ashwin Shimpi Environment: Apache Tomee 1.6.2 and EJB 3 OpenJDK Java 1.8.0 Apache ISIS - latest version, 1.8.0
Accessing ISIS Domain Services via EJB
Hello, We are interested in integrating Apache ISIS Domain Services (and Domain Objects) in an existing application architecture, via EJB. We briefly investigated using the RESTful interface, but the HATEOAS (hypertext as the engine of application state) style of interacting with ISIS was a bit more involved than we feel comfortable using as this point in time. Is there a way to access ISIS Domain Services via EJB ? If someone can point me (and my colleagues) in the right direction, we would be grateful. Best Regards, David Harrison and Ashwin Shimpi Environment: Apache Tomee 1.6.2 and EJB 3 OpenJDK Java 1.8.0 Apache ISIS - latest version, 1.8.0