glassfish

Get the name of a Glassfish2 domain

Hello, is it possible to get the name of the current domain in Glassfish v2? I've got a code like: MemoryMXBean bean = ManagementFactory.getMemoryMXBean(); if (bean != null) { MemoryUsage usage = bean.getNonHeapMemoryUsage(); int current = (int) ((double) usage.getUsed() / usage.getMax() * 100); ch.log(...

GlassFish SSO, logout problem

Hi Stackoverflow, I'm developing some J2EE applications that should have common login point. My apps are hosted on GlassFish v3 application server. There is web.xml based security with FORM method (a HTML form with "j_security_check" action) and JDBC Realm on PostgreSQL 8.4 datasource. It worked absolutely fine while GlassFish SSO was ...

Remote interface lookup-problem in Glassfish3

I have deployed a war-file, with actionclasses and a facade, and a jar-file with ejb-components (a stateless bean, a couple of entities and a persistence.xml) on glassfish3. My problem is that i cant find my remote interface to the stateless bean from my facade. My bean and interface looks like: @Remote public interface RecordService {...

exception message getting lost in IIOP between glassfish domains

I'm running two glassfish v2 domains containing stateless session EJBs. In a few cases, an EJB in one domain has to call one in the other. My problem is that when the called EJB aborts with an exception, the caller does not receive the message of the exception and instead reports an internal error that is not helpful at all in diagnosi...

Glassfish JAX-WS side by side SSL / insecure EJB webservice

Is it possible to run a single @WebService bean as both secure and insecure at the same time, preferably using the same URL except for the http/https protocol difference? I am able to run the service either secure or insecure using: <transport-guarantee>CONFIDENTIAL</transport-guarantee> or <transport-guarantee>NONE</transport-guara...

How do I inject @WebServiceRef resources through Glassfish JNDI?

My web application is a consumer of some internal web services provided by the organisation. I have seen a couple of examples where a web service reference is injected using something like: @WebServiceRef(name="services/MyService") MyService myService; But I have no idea how to define the services/MyService JNDI object in Glassfish v...

How to make/monitor/deploy daemon processes in JRuby

I'm currently porting a Rails App currently using REE to JRuby so I can offer an easy-to-install JRuby alternative. I've bundled the app into a WAR file using Bundler which I'm currently deploying to GlassFish. However, this app has a couple of daemon processes and it would be ideal if these could be part of the WAR file, and potentiall...

How to use common log4j.xml settings for across the Application WAR files in GlassFish?

I want to use single(or externalize) log4j.xml to control logging settings from outside of all the application war files. Do I need to use JVM Options like -Dlog4j.configuration=/path/to/log4j.xml? Where to put log4j.xml so that it will be accessible by all the applications that are deployed ...

Parameter for BPEL process

Hi I use OpenESB + BPEL. I would like to use some parameter to set system specific settings (path, string constants, etc.). I tried to use a properties file that a simple java class should read up and use with this method (http://wiki.open-esb.java.net/Wiki.jsp?page=BPELSEHowToCallJavaMethods). The problem is that I can't create proper...

Path to a file in a webapp under GlassFish

How do I specify the path to a file in a web application? I have a folder named 'templates' under WEB-INF, I've been told that under GlassFish v3 the path should look like this: ./WebContent/WEB-INF/templates but this way I'm getting a file not found exception. What do I have to change in order to make it work? ...

DB2 Driver Connection Hanging in Glassfish Connection Pool

We have an intermittent issue around the DB2 used from a Glassfish connection pool. What happens is this: Under situations where the database (DB2 on ZOS) is under stress, our application (which is a multi-threaded application using connections to DB2 via a Glassfish connection pool) stops doing anything. The following are observed: 1...

copy child collection to another object

Hi everyone, I have a one-to-many relationship between Part and Params (a "Part" has many "Params). I'm trying to do something naive like this: Part sourcePart = em.find(Part.class, partIdSource); Part destPart = em.find(Part.class, partIdDest); Collection<Param> paramListSource = sourcePart.getParamList(); destPart.setParamList(par...

How do I increase memory given to maven-glassfish-plugin?

I'm using the Maven plugin for embedded Glassfish - here's my plugin declaration: <plugin> <artifactId>maven-glassfish-plugin</artifactId> <packaging>maven-plugin</packaging> <version>1.0-alpha-4</version> <configuration> <httpPort>8080</httpPort> </configuration> </plugin> After several clicks through my data-intensive ...

JDBC Connection pool monitoring GlassFish

I am trying to find a setting by which the connection pool monitoring information would come in the server.log whenever an error like "error allocating a connection" or "connection closed" occur. I found some blog entries that talk about this but they mention it from GUI prespective. However, I want a setting on the connection pool i...

Application Servers(java) : Should adding RAM to server depend on each domain's -Xmx value?

We have Glassfish application server running in Linux servers. Each Glassfish installation hosts 3 domains. Each domain has a JVM configuration such as -Xms 1GB and -XmX 2GB. That means if all these three domains are running at max memory, server should be able to allocate total 6GB to the JVMs With that math,each of our server has 8GB ...

What does Glassfish use as backing store to JNDI when clustered?

I have a JBoss background, where JNDI in clusters is provided by a centralized fail-over service, HA-JNDI. With this configuration you get one JNDI namespace across the cluster (i.e I can look up a service on node B from node A). When i look at the glassfish architecture, I cannot deduce how (and if) JDNI is synchronized between server i...

How to "parameterize" JPA database instance in persistence.xml?

I have a Java web application leveraging JPA. The database instance is specified in the persistence.xml file using the jta-data-source tag. I would like to deploy a second copy of the web application on the same (glassfish) server, but pointed at a different database instance. What is the best way to achieve this? I think ideally, I'...

javax.naming.NameAlreadyBoundException: in glassfish server v2

Hi! I'm implementing stateless session bean ejb3 in glassfish server using netbeans. First time, it is working properly. Later, I'm getting the exception as follows: LDR5012: Jndi name conflict found in [SampleEjb3]. Jndi name [Lulu.HellostatelessRemote] for bean [HellostatelessBean] is already in use. LDR5013: Naming except...

Glassfish appication server + application client on ipad

I have written an enterprise application on glassfish v2 application server with java application client. This application client is running on PCs with windows/linux OS. On server side I'm using EJBs. The task is to adopt additionally the client on ipads without/with minimal backend changes. And there are some options for that purpose. ...

File upload from standalone client

Is is applicable to use Apache FileUpload lib to to upload files to Glassfish v2 server using standalone client? If yes, what are the differences for this purpose? ...