glassfish

How to override j_security_check in glassfish?

I'm currently using FORM based authentication in glassfish v2.1 to log users in and it works fine. I want to switch to ProgrammaticLogin and I want to be able to get the initially requested URL (i.e. before redirecting to login page) and use it in my programmatic login code so that the user is redirected back to the requested page after ...

How can I change the ContextRoot that Maven Glassfish Plugin deploys to?

Hey, I'm deploying a webapp (WebApp.war, say) using the Maven Glassfish Plugin. Rather than it being deployed to http://localhost/WebApp I want it to be deployed to http://localhost/AnotherName - that is, I want to change the context root it's deployed to. I can't work out how to do this with the plugin, is it an option? ...

XAResource.end called without calling start

Saw this in our logs on an internal test cluster: "java.lang.RuntimeException: Got exception during XAResource.end : org.postgresql.xa.PGXAException: tried to call end without corresponding start call" I've had some previous issues with getting XA transactions running smoothly under Glassfish 2.1 in a clustered deployment. Those arose...

What experience do you have using nginx and memcached to optimize a web site?

We have a Java EE-based web application running on a Glassfish app server cluster. The incoming traffic will mainly be RESTful requests for XML-based representations of our application resources, but perhaps 5% of the traffic might be for JSON- or XHTML/CSS-based representations. We're now investigating load-balancing solutions to dist...

How is it possible to limit the number of instances of an EJB ?

I wan to check if my stateful bean is passivated/activated and the corresponding callbacks are called properly. For that I want to configure the containers GlassFish and/or JBOSS to limit the number of instances of the bean. Is it possible ? If yes, how ? ...

JCIFS NTLM Authentication for HTTP Connections on GlassFish (or any servlet container)

I've created a Java class that connects to an IIS website requiring NTLM authentication. The Java class uses the JCIFS library and is based on the following example: Config.registerSmbURLHandler(); Config.setProperty("jcifs.smb.client.domain", domain); Config.setProperty("jcifs.smb.client.username", user); Config.setProperty("jcifs.smb....

How do I stop a class from logging in java.util.Logger under Glassfish

My Glassfish server logs messages like this every 10 minutes or so: [#|2009-07-01T10:10:03.373+0930|WARNING|sun-appserver9.1|javax.enterprise.system.stream.err|_ThreadID=21;_ThreadName=Timer-13;_RequestID=30966ccf-eac6-4cff-8256-22bc31862686;| java.lang.NullPointerException: name cannot be null at javax.management.ObjectName.constru...

Application configuration files for Glassfish/Java EE 5 web services...

I am trying to write some simple Java web services so we can call Java code from .NET. So far, I got a proof-of-concept working under Glassfish. Pretty straightforward when the IDE does all the work. Now I'm really bogging down on stuff in Java that should be really simple. For example, I want to externalize my configuration so I can...

Localhost:8080 not loading - glassfish

hi I have installed Glassfish webserver version 10, successfully in MAC OS. I had no problem intalling or starting the server. the server is running, but when i try to run glassfish in port:8080, it is not loading and i get a blank page. however, localhost 4848 is loading and I can see webspace enabled there. I have tried with jdk5,6 and...

Exception in J2EEC Phase while processing jax-ws-catalog.xml

Hi I should preface this with the fact that I am relatively new to EJB3 Metro and Java in general. I am writing an EJB3 application to run on glassfish v2.1 that needs to talk to a Microsoft CRM webservice within an NTLM authenticated network. I am using the JAX-WS (Metro) framework to access the webservice and want to use the XML cat...

Magnolia CMS under Glassfish v3

Does anybody knows how to install Magnolia CMS on Glassfish? I tryed and i get an error. Or you can to advice me another CMS on Java. ...

Can a local glassfish on windows be configured to work with a remote db2 on UNIX?

Hello I am trying to make db2 work in glassfish with no luck at all. I've read the documentation, but no matter what I do I end up stuck with an error when I do a ping. I put the jar files for the db2 driver and connectivity in the classpath prefix, added them to the lib directory of the domain and no go. What am I doing wrong? Thank yo...

Apache Commons FileUpload problem on Glassfish server

I have simple web app that just has one Servlet that accepts data file and saves it to the server. I'm using "apache commons FileUpload" library. File uploading work fine on my local server (I'm using Glassfish for my Dev and Prod server). I can upload any size files. Here is my memory info: -XX:MaxPermSize=512m -Xmx1024m Here is the ...

Use Grizzly transparently under the hood?

Is there a way to bind grizzly dynamic/transparent to my Java Applications (maybe by using spring)? Or is the IO handling part of the Web Container (eg. Glassfish)? ...

Starting Glassfish a java arg via Eclipse

I need to pass in a java argument when I start Glassfish via Eclipse. The arg is "-javaagent:/path/to/spring-agent.jar". Do I set this in Eclipse somewhere, in Glassfish's admin area somewhere, or both? ...

How to set solr.home in Glassfish with centOS?

Hi all: I want use glassfish as the solr search server, but I don't know how to set the solr.home in glassfish with centOS . I tried to set solr.home, but it didn't work. The error was: " looking for solr.xml: /var/deploy/solr/solr.xml " Anybody knows? [email protected] Thanks! ...

eclipse is not building my EAR correctly - sometimes it forgets the war, and always leaves out my library jars - why?

I just upgraded to eclipse galileo from ganymede sr2 and now eclipse is doing a really bad job of building my EAR file during deployment. There are several utility jars that are supposed to be included that it is completely ignoring, and there is a single war file that it only includes in the EAR occasionally. Thus, when I deploy to gl...

How to use login callback for application client.

I'm writing a Swing application client (it's runs over webstart, and I'm using glassfish). In the application class I have: @EJB private static MyBean myBean; and in MyBean I have: @Remote public interface MyBean { public int getRand(); } @DeclareRoles(("admin")) @Stateful(name="MyBean") public class MyBeanImpl implements MyBean {...

Glassfish Custom Authentication Module?

I know glassfish can authenticate against an LDAP server, I also know it can authenticate against my own database. What I would like to do is authenticate users against LDAP, but get their roles from my own database. Where would I start learning how to create my own custom authentication module? ...

Server starting slowly

I am using MyEclipse, and I have a local Glassfish server controlled by the IDE. When I am at work, having a fast internet connection, the server starts quickly. However, when I am at home, not having as fast an internet connection, the server starts slowly. The server is on my local box, why would the internet connection speed matter ...