I have an EJB accessed remotely from a Swing client as well as locally by servlet/JSP. I want to switch the packaging for my EJB from a EJB/WAR/EAR to a EJB/WAR since it is simpler to work with.
What do I mean by simpler? In Eclipse, for example, I can have a single project with my EJB/web classes rather than having a EJB + WAR + EAR project (My client is a separate project in Eclipse).
Is it possible to package a EJB in a WAR and have it be accessible remotely?
The intent of EJB-in-WAR was primarily to simplify packaging for local EJBs used by the WAR. However, I cannot find a restriction for remote EJBs packaged in a WAR even though there are restrictions on other technologies (specifically, entity beans and JAX-RPC endpoints are not allowed), which leads me to believe remote views are allowed in WARs from a specification perspective. I don't have broad knowledge of vendor implementations, but I have tested that it works on WebSphere Application Server.
According to the web profile and EJB 3.1 specs, Java EE web profile products are only required to provide EJB Lite, which doesn't support remote clients to EJBs.
But they can provide remote ejb client connection as a product optional component.
So if you want to package remote EJBs in a WAR you'll have to look for a Java EE web server that provides this service and be aware that the same behaviour isn't required in other Java EE 6 web servers.
Useful links:
http://download.oracle.com/otndocs/jcp/javaee_web_profile-6.0-fr-eval-oth-JSpec/
http://download.oracle.com/otndocs/jcp/ejb-3.1-fr-eval-oth-JSpec/
Related
Trying to create a Mule project with support for multiple version endpoints. To begin with I have started with two API specification with same endpoints but with different version.
hello-world-v1.raml (version: 1, GET /hello)
hello-world-v2.raml (version: 2, GET /hello)
Then used these both RAML files to create Mule project. By default it created two Listeners on different port. But I want to start app in single server and port but go to flow based version of path e.g.
https://www.custom-greetings.com/api/v1/hello will server based on first RAML specification whereas
https://www.custom-greetings.com/api/v2/hello will server based on second RAML specification
The reason I want to have Mule project with both version is so that my client can use same domain instead of
https://www.custom-greetings-v1.com vs https://www.custom-greetings-v2.com
I am pretty sure there is efficient way to do this but not finding any related example or guidance.
Any help/pointer is appreciated.
Thanks.
If you are deploying to a standalone Mule server you can move the HTTP Listener configuration to a Mule Domain and share it with both applications. That way both listen to the same port but in different URI paths. This method can not be used in CloudHub nor Runtime Fabric deployments because they don't support domains.
Another alternative would be to combine manually both RAMLs into a single one and create a single application with a single HTTP Listener for both APIs. This alternative will be compatible with CloudHub and Runtime Fabric.
Yet another option would be to put a load balancer in front of both applications. For a standalone Mule installation you need to provide your own load balancer. CloudHub provides a feature called Dedicated Load Balancer to do this. Runtime Fabric uses Kubernetes ingress mechanism.
We're developing a cloud based web application for customer management. One of the main goals i the capability to connect to different local applications on the customer endpoint.
As example, we don't want to have a customer database in out application, the customer should be able to search within his local ERP system right away.
What we need is not much. Only a client on the customers server with access to the local SQL server as well as the COM model.
But as webdevelopers and mainly going with PHP the question came up, what technology we should use?
I've got two approaches in mind:
NodeJS
Lightweight, Javascript and with the Express and winole32 extension we should have everything we need. But the deployment and installation as a service seems to be a bit wacky.
C# .Net Web API
Also a good approach I guess since the client servers are allways windows. But is there a way without IIS?
Or do you have something completely different in mind? It should be very fast and compact. So its basically just a RESTservice that can be deployed with ease.
Thanks for your inputs and thoughts.
C# .Net Web API Also a good approach I guess since the client servers are
allways windows. But is there a way without IIS
It is called OWIN and it is properly documented (web api self host is a good keyword) and works like a charm. Using that on various services to expose an API into the service.
The Camel web page says
The following projects can leverage Apache Camel as a routing and mediation engine:
Apache ServiceMix - a popular distributed open source ESB and JBI container
Apache ActiveMQ - a mature, widely used open source message broker
Apache CXF - a smart web services suite (JAX-WS and JAX-RS)
Apache Karaf - a small OSGi based runtime in which applications can be deployed
Apache MINA - a high-performance NIO-driven networking framework
However, I would like to run Camel inside a Java EE web application and have access to web services, JMS, and EJB (CDI, message driven beans, JPA, etc.) Preferably using an open source Java EE server.
If I recommend this to my company, then then all the usual Java EE wizards such as wsdl2java need to work out of the box. There also needs to be documentation and tutorials so we can hire people to jump in and start using it.
Glassfish failed across the board. The wsdl2java wizard for CXF fails using the Glassfish runtime classes (I ran it manually and hacked my code tree.) There is no documentation nor any tutorials for wiring in OpenMQ (and google searches on the topic are discouraging.) Simple library-only samples run fine, of course, but without having ActiveMQ as the native JMS it seems to be a dead end. CXF integration seems unworkable as well. My first attempt at copying a WS sample complains "No component found with scheme: cxf" which appears to be a bundle or classpath issue.
I'm starting to think I should go back to ServiceMix and drop back to servlets without EJBs and CDI, even though I really hated not being able to use Eclipse gracefully for edit/compile/debug (you pretty much have to build and run from an outside DOS prompt window and remote debug in.)
You can use Apache Camel with any container of choice. We try to not have any restrictions or barriers. You can also run it standalone. The web page just mentions some of the containers you can use.
Apache Camel is just a bunch of JAR files you can deploy and use in any container of choice. For example with WAR files you can deploy to Tomcat, TomEE, etc.
I have ported a Java EE web application from JBoss 4.0.5/Java 5 to Tomcat 6.0.33/Java 6.
The web application exposes some web services. They were implemented as JAX-RPC web services in JBoss, I have adapted them as JAX-WS web services using CXF 2.6 as the implementation run-time. Now I have been requested to make available in the new environment (Tomcat 6.0.33/Java 6) also the JAX-RPC web services for compatibility with existing clients. The two versions of the same web services would of course be available through two different end point URLs.
The JAX-RPC web services in JBoss 4.0.5/Java 5 are implemented using Spring (the implementation class extends org.springframework.remoting.jaxrpc.ServletEndpointSupport, found in spring-remoting-2.0.8.jar) but I cannot guess which is the underlaying implementation framework for JAX-RPC made available by JBoss. I just can see that the configuration files are webservices.xml and jaxrpc-mapping.xml.
I tried to "replicate" that Spring configuration in Tomcat but when I try to retrieve the WSDL I get an error javax.servlet.ServletException: Class pack.age.MyEndPoint is not a Servlet. Indeed that class (the JAX-RPC end point implementation class) is not a servlet but under JBoss 4.0.5/Java 5 it is declared in web.xml as a servlet and it works.
Could you please help? I imagine I just have to supply the proper JAX-RPC implementation framework to Tomcat (I would like to avoid AXIS because it uses different configuration files). Thanks in advance.
My company is looking to set up a Sharepoint server for some of our internal users. We would like this to be accessible to external users using our current domain (www.companyname.com). The problem we are having is that www.companyname.com is set up using an IBM HTTP Server (basically Apache) and is based mostly around Java and Websphere. I was wondering if there was a plug-in available for Apache that would allow my to link up the Sharepoint server (running on IIS) with Apache, much like what is done with Websphere and Apache. Any help would be appreciated.
You could probably just use the generic HTTP reverse proxy support in Apache. If you use this in IHS to front-end sharepoint, it would not be supported by IBM and is technically in violation of the license.
If you receive IHS with an IBM product, it's only licensed and supported when used in direct support of the product it came with.