JBoss and play server - jboss

In my application i have 2 servers : jboss server and a separate webserver using the play framework.
I am developing with JAVA on server-side, and on client-side with java swing.
So, I have 2 distinct wars, let say they can be accessed as following:
https.//localhost:8093 : jboss server
http.//localhost:9443 : play server
Now I want to implement a redirection between jboss and webserver : so i can access to jboss calls from rest api.
Have someone any idea how to implement that ?

Related

Tomcat Server gets unresponsive

I am new in JPA and java Web App development.Please help me.
Overview:
I am developing one java web application with Apache Tomcat Server [Version 7.0.70]. And It is multi-user system.
Platform : JVM Java 1.7
Framework : JPA
Database : My-Sql Workbench 6.3
Jars: MySQL Connector and Eclipse-link
Problem:
Once deploying war file into server 10 clients parallel accessing to the server with 10 unique log-in sessions . After sometime [Uncertain] server gets un-responssive and no database operations working.
After this it need to restart the tomcat server. and system gets work finely. its a continuous process to handle the system.
Image : My Tomcat Server Error
This image content that shows error when server gets un-responssive
Is there any caching problem
Image persistence.xml : Persistence Unit Cashing
Thank you,
Please give me solution.

Web Services in old JBoss 3.2.3.GA

We have an old JBoss 3.2.3 server which hosted an application and exposed EJBs for remote access.
This application has only received minor maintenance in years, and we did not put some effort to migrate it to newer releases of the app server.
Now, we are integrating it with another application, and we have a requirement to also expose SOAP Web Services.
At first, I wasn't worried, since JBoss 3.2.3 announces compliance with the J2EE 1.4 spec (JSR151), which specifies the APIs for web services: web services (JSR109) and JAXRPC (JSR101).
However, my first deploy using the JAX-RPC api failed, because JBoss did not find the JAX-RPC classes.
So my questions are:
Is JBoss 3.2.3 really a J2EE 1.4 app server ? The lack of JAX-RPC classes seem to indicate otherwise.
What are the APIs for exposing a web services in JBoss 3.2.3 ?
What are the APIs for consuming a web services from an EJB deployed in JBoss 3.2.3 ?
In the end, I can always deploy additional APIs and libraries with my application, but I'd like to avoid overlapping existing libraries.
JBoss 3.2.3.GA is not a fully compliant J2EE 1.4 server. For instance, it does not implement the EJB 2.1 interface, only EJB 2.0 [1].
Also, JBoss 4.0 announces being the first J2EE 1.4 compliant server; I conclude that JBoss.org did not certify JBoss 3.2.3 as compliant.
Even though not-compliant, JBoss 3.2.3 has some features for consuming SOAP Web-Services. For instance, it ships with Apache Axis 1.1 and JAX-RPC apis, so one can easily generate java classes for a WS client outside the server and have them run in an enterprise app.
Exposing web services is a more difficult task. One way of exposing web services is to create a Stateless EJB and expose it as a webservice endpoint. However, that's part of the EJB2.1 spec, which is not available in 3.2.3.
Too bad ! In the end, we will look for other alternatives in exposing our web services.
The newer JavaEE specs and servers are so much easier to develop for. It's the old specs and servers that gave JavaEE a bad rep.

How to deploy non-ear website in jboss

I have a website comprising of a server and client. The server is an EAR, and I'm using JBoss to deploy it. The frontend is a series of html/js/css files that call into the backend via ajax.
I can deploy the frontend to an apache (2.2) server, and it works fine, however, I have a requirement that they both be on the same port (with different contexts). How do I deploy my static files to jboss in their own context? It also needs to be able to use mod_rewrite (or something similar).
Thanks
You could use Apache as the front end web server for the Jboss app server behind it. You can deploy all your content to Jboss and configure Apache to manage it.
Or you can use Apache to serve the static content and still use it as the front end for Jboss, configuring Apache to map your Jboss port to Apache. You can configure it to use different contexts if you need to.
Take a look here

Tomee / OpenEJB migration from JBoss

I am newby to TomEE+. I just try to deploy my existings EJB (large application with about 100 jars) from JBoss, just copying in webapps.
It seems to work but when I start my client, It tries to call my ejb and fails due to bad port :
Client configuration :
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
java.naming.provider.url=localhost:1099
How can I change the openejb port listening ? Do I have many change to switch JBoss to TomEE ?
Thanks
How do you call EJBs from client? TommEE is not full profile certified Java EE6 server so if you are using something what is not in web profile, there's some chance that it's not yet implemented.

How things work after deployement in Application Server?

Till now I have been coding in Java.
Wanted to know - what happens after deployment in Application Server
Suppose I deployed my EAR in AppServer (WebSphere or Jboss and Assuming Deployed Successfully!)
EAR convert into tmp files.. etc etc
How request picks some EAR or WAR in 100's of EARs or WARs in
Application Server ?
How application server look for datasources ?
How Plugin-cfg.xml works.
..
..
etc...etc..many more
Is there any document or anything ?
That is a VERY VERY vague question, I would start here: http://pic.dhe.ibm.com/infocenter/wasinfo/v7r0/index.jsp
with the instructions for WebSphere Application server v7 "Developing and deploying applications" section.
I think the implementation of servers vary, so trying to put some basic principles.
How request picks some EAR or WAR in 100's of EARs or WARs in Application Server ?
Application Server keeps a list of WAR and bind URL patterns /* . If pattern matched, request goes to the application. Otherwise - error 404. Then application should be in memory, i.e. loaded by using specific classloader. After that methods like doGet called using reflection.
How application server look for datasources?
Application server collected all resources from xml description during startup and changes on request. Next, return it on call. Here is example from Tomcat source of taking datasource from Hashtable environment.