Tag Info

Hot answers tagged

10

You could do it, but you are going to run into performance problems first, and security problems second. Having a "normal" high performance web server answering on port 80/443 and proxying requests to your app server is the way things are usually done. The "normal" server can handle things like static images, JavaScript and CSS much more easily than ...


6

We have studied relative performance of JBoss vs. Glassfish, and found that Glassfish scales much better under high loads.


6

Don't forget to consider Jetty. I like very much: its ease of configuration and deployment (just unzip it and optionally edit one config file) the fact that it's easily embeddable in other applications (with a single jar) its support for continuations a lot before the Servlet 3 spec is ready Check this comparison out, it's done by a Jetty dev, but it's ...


6

Tomcat is definitely an application server, as it will happily process Java server-side code in order to generate dynamic contents, while instead a "pure" web server (like Apache) can only serve static web pages; so your teacher is totally wrong here. What is right is that Tomcat doesn't provide native JSF support; but the more than 4500000 results shown by ...


5

Most people are going to say you need something in-front because of static files. This is somewhat dumb because: You can configure Tomcat to use the same IO as apache with APR You should be using a CDN (Content delivery network) anyways. The real reason you need something in-front of tomcat/jetty/jboss to load balance and handle failover. I recommend ...


5

delete directory domains/$YOUR_DOMAIN/applications/j2ee-*/$YOUR_APPLICATION (thanks, chris_l) clean out domains/$YOUR_DOMAIN/generated/*/j2ee-*/$YOUR_APPLICATION remove all entries regarding $YOUR_APPLICATION from domains/$YOUR_DOMAIN/config/domain.xml (usually there are two records - one in domain>applications>web-module and one in ...


5

you may want to try your questions over at stackoverflow.com. At my company the programming teams set up those application servers and then work with production support. We keep JBoss in our repository because of all the configuration changes and each server we deploy needs to be slightly modified. I've enjoyed playing with JBoss and the people in the ...


5

My current preferred stack is to use nginx as a replacement for Apache. Wherever necessary, php-fpm fills in the need for PHP. Such a setup has worked nicely for deploying apps such as Rails, Magento and SugarCRM.


5

They're often the same, but technically an app server is not limited to HTTP requests, and is often behind a web server and provides "business logic" in the form of web service calls which are used to construct the actual resources requested by the end user. See this for more: http://www.javaworld.com/javaworld/javaqa/2002-08/01-qa-0823-appvswebserver.html ...


5

I tested this in Linux version 2.6.18-164.el5 - Red Hat 4.1.2-46. I could see that the ulimit is applied per process. The parameter is set at user level, but applied for each process. Eg: 1024 was the limit. Multiple processes were started and the files open by each one was counted using ls -l /proc/--$pid--/fd/ | wc -l There were no errors when the ...


4

Using top to determine memory requirements is more an art than an exact science. There are two primary ways to go about it. In both cases you want to take a baseline of the system's resource usage before you start the program you're investigating (in your case GlassFish). Then you follow one of two paths: Aggregate Memory Usage Path This is the way I ...


4

The code for the forum has the /forum/ path hardcoded in the HTML that it's sending to the client, or otherwise defined somewhere in its configuration. If you can change it to /, do so; otherwise, you can work around it in your Apache config: <VirtualHost *:80> ServerName forum.mydomain.com ProxyPass /forum/ http://127.0.0.1:8080/forum/ ...


4

Glassfish will be more scalable than Tomcat because it uses Grizzly (NIO based). You don't have many options other than a variation of Tomcat, Jetty, or Glassfish because of the Java requirement. PHP can be run using Quercus, but it may be better to just deploy it using Nginx.


4

Glassfish is an application server as it handles EJB requests (EJB Container) while Tomcat is a Web Container - it can't handle EJB components. So, what are the components of the application you plan to run. If your application uses Servlets and JSPs, then GlassFish is an overkill. If you have EJBs then you can't use Tomcat anyway. So, I think it starts with ...


4

The answer is that Glassfish in the latest versions splits the response into multiple packets. I posted on the haproxy mailing list and had a remarkably quick response. Krzysztof Oledzki confirmed that haproxy assumes that the response will all be contained within the the first packet as that is the behavior of most known web servers. He built a patch ...


4

To set up SSL on a fresh install of Glassfish 3.1 I had numerous issues with 3.0.1 so I would recommend upgrading to 3.1 Following the instructions on the link above, this successfully creates the keystore and certificates. Change Master password The master password which is set on Glassfish is also the password which allows access to the SSL certificate ...


4

I found the answer: from the shell, inside the GlassFish directory with GlassFish running, type: bin/asadmin create-system-properties \ org.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false I've added the backslash to format the command in two lines, but it can be typed without it on one line.


3

It depends on the ecosystem around your app. In an intranet environment - you probably do not need anything in front of Tomcat. If alone on the internet as a public facing service, it depends. Apache is nice to because of the modules it provides like mod_security. But if you are not knowledgeable with the configuration of apache(or ngix) - then you could ...


3

That RBAC command/privilege is Solaris specific. Since you're using CentOS, I doubt you're using a new enough kernel (at least 2.6.24) that supports the cleanest solution which involves setpcap. Using iptables to redirect port 80 might be your best bet. For reference, see this stackoverflow question.


3

I use NAT all the time in production. While it is more commonly used to translate between intranet and Internet, it can be perfectly acceptable to use it this way as well. I've done similar for an almost identical situation. With that being said, there are other options. Application servers and Web servers often run together, as such it makes sense to ...


3

Instead of using ajp, I would recommend using mod_proxy. I have done that myself with great success. The way I have my stuff set up, I just configure a virtual domain to point to a directory, and create a .htaccess file as such: ProxyPass / http://localhost:8080/ ProxyPassReverse / http://localhost:8080/ Of course, alter to match your HTTP ports. In ...


3

How good is Glassfish at serving static content? Name-based vhosting? Redirects? I'm willing to bet that Apache is better at it all. If you're particularly interested in a small footprint frontend webserver, though, look at nginx instead of Apache.


3

I think your best bet is to use mod_proxy on apache... Something like the following on your virtual host: ProxyPass /somepath http://localhost:8080/SomeApp/somepath ProxyPassReverse /somepath http://localhost:8080/SomeApp/somepath This would make it so that when you access /somepath on your apache you're actually accessing the glassfish server ...


3

Is it possible that inside the cronjob the ${JAVA_HOME} is not set? Java always requires certain environment variables to be set in the environment. Maybe you set them automatically when you use your cli, but the cronjob doesn't have them. Try to do env on your cli, to see if there is some java related stuff like ${JAVA_HOME} and if so make sure the cronjob ...


3

If you have SSH access to your server you can forward this port to your local machine like this: ssh -L 4848:127.0.0.1:4848 user@some_server.com and then use http://127.0.0.1:4848 on your local PC to access Glassfish admin interface.


2

You can do this even as a non-administrator: net use lpt1 \\192.168.1.104\HPLaserJ. This will map the printer to your LPT1 port. If you just want a regular install of a network printer, browse to \192.168.1.104, right-click the printer and choose "Connect". If this fails, then you have a sharing permissions issue. Check your event logs for details.


2

It's concatenated with the encrypted password string (possibly with delimiter characters, possibly just a fixed number of characters; depends on which particular password file you're talking about) So, for example, my /etc/shadow contains $6$prRzIBxG$K4w0950HW9eMmVgzqpmdgfpxqmFtXZx.mS7wGorSoeXvt51tejXxx22CoTsrmj9AsszgT.CvkB5BrPuMq1r.Z/ as the encrypted ...


2

Note that a micro instance is: very limited in term of CPU & it use the concept of burstable allocation. The exact description is : Up to 2 EC2 Compute Units (for short periodic bursts). very limited in term of memory (613MB). Make sure Glassfish doesn't try to over allocate as you'll swap to disk and this get heavily penalized in AWS EC2. Pretty ...


2

You should check Open PaaS like Cloudify, which I'm one of its contributors (see http://www.cloudifysource.org). Using such Open PaaS can really give you the freedom to pick any Private Cloud. Cloudify can easily on board any service (e.g. Websphere), on any cloud.



Only top voted, non community-wiki answers of a minimum length are eligible