glassfish-3

Where does glassfish save your class/project after deployment on Windows?

随声附和 提交于 2019-12-04 17:16:25
问题 I am using Glassfish3.1 on Windows XP. After deploy a web service project using Netbeans, it works fine. But when i go to install-path\glassfish-3.1\glassfish\domains\domain1\applications I don't see my application. under install\glassfish-3.1\glassfish\domains\domain1\applications\__internal , there's a folder with the same name as my project. But that folder is empty. But if i deploy a project on linux, i can find my application and classes under application folder. So where are they on

Java EE 6 embedded glassfish embedded derby EJB unit test

泄露秘密 提交于 2019-12-04 14:40:53
问题 questing is about javaee6 with embedded glassfish and embedded derby jndi lookup for data source at the time of deployment before unit test is executed.... Please find the persistence.xml here... <?xml version="1.0" encoding="UTF-8"?> <persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd" version="2.0"> <persistence

GlassFish v3 Domain Server cannot start. Port is occupied

耗尽温柔 提交于 2019-12-04 10:40:25
问题 I imagine this is a pretty generic error. I cant seem to find any documentation on it. I am simply attempting to run a java web project with jsp's and beans... using netbeans 6.8 on windows xp. Thoughts? apologies for such a newb question. -Kirb 回答1: you need to know who occupied the port. run in cmd netstat -aon | find ":80" | find "LISTENING" you will see process id. go to Task Manager and drop it. 回答2: In Linux you get this error if the servername is not in the hosts file check /etc

Glassfish - uploading images - doing it right

大城市里の小女人 提交于 2019-12-04 10:10:24
I am on latest glassfish (3.1.2) - so no need for apache FileItem and no bugs with getPart(). I read that the best practice on uploading images is saving them on the file system (see here for instance). I am editing already existing code - smelly at that - so I had the idea to do : Part p1 = request.getPart("file"); System.out.println("!!!!!P1 : " + p1); Prints : !!!!!P1 : File name=DSC03660.JPG, StoreLocation=C:\_\glassfish3\glassfish\domains\domain1\generated\jsp\elkethe\upload_7cb06306_138b413999a__7ffa_00000000.tmp, size=2589152bytes, isFormField=false, FieldName=file newlines mine. In the

client for remote JMS queue

℡╲_俬逩灬. 提交于 2019-12-04 09:43:51
问题 I have a JMS queue configured on remote glassfish server. I'm trying to connect this queue from my local machine. Is it possible to connect directly to this server or I need to connect via some broker/agent? How does it work? (I'm fresh in jms area) Many thanks 回答1: If your client application is running outside Glassfish here is a simple code example for an open mq client. To get it to work you will need to reference 2 openmq jars from the glassfishInstall/mq/lib directory - imq.jar and jms

PermGen space issue with Glassfish/Hibernate

左心房为你撑大大i 提交于 2019-12-04 09:37:47
问题 I'm running a GWT+Hibernate app on Glassfish 3.1. After a few hours, I run out of Permgen space. This is without any webapp reloads. I'm running with –XX:MaxPermSize=256m –XmX1024m . I took the advice from this page, and found that I'm leaking tons of classes- all of my Hibernate models and all of my GWT RequestFactory proxies. The guide referenced above says to "inspect the chains, locate the accidental reference, and fix the code". Easier said than done. The classloader always points back

How do I bind web service to a particular glassfish port?

大城市里の小女人 提交于 2019-12-04 08:53:00
I have Glassfish 3.1.1 (Metro JAX-WS stack) installation with several http listeners in my domain's virtual server. When I deploy my EAR, web application and soap services are all bound to all available http listeners whereas I want them to be held by different listeners, each having it's own performance and connection pool setup. I believed that sun-web.xml should be responsible for that sort of binding but I haven't found any options of binding service to specific port or virtual server. Any ideas? One option is to use the deploy command with an accordingly set virtualservers commandline

Where can I configure the thread pool behind the @Asynchronous calls in Java EE 6?

扶醉桌前 提交于 2019-12-04 08:33:06
问题 I recently learned that I can easily make any session bean method Asynchronous by simply adding the @Asynchronous annotation. E.g. @Asynchronous public Future<String> processPayment(Order order) throws PaymentException { ... } I know that Java EE 7 added Concurrency Utilities, but in Java EE 6, where is the thread pool configuration of the @Asyncronous methods? is there a way to set a timeout? is it a fixed thread pool? a cached one? what is it's priority? Is it configurable somewhere in the

ClassCastException in JPA Entitiy after redeploy (Glassfish 3.1.2)

老子叫甜甜 提交于 2019-12-04 08:24:42
I have a strange effect when undeploying and deploying a WebArchive (.war) with Glassfish 3.1.2. $ asadmin undeploy myWebApp; asadmin deploy target/myWebApp.war It deploys normally, but when I fetch an entity bean via the entity manager, it throws an Exception: [#|2012-12-11T15:26:09.772+0100|SEVERE|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=119;_ThreadName=Thread-2;|java.lang.ClassCastException: org.YourEntity cannot be cast to org.YourEntity The exception is thrown in the q.getSingleResult() call. @PersistenceContext(unitName = "org.my-PU") private

Use Glassfish JMS from remote client

試著忘記壹切 提交于 2019-12-04 07:31:26
I have glassfish installed on a server with a JMS ConnectionFactory set up jms/MyConnectionFactory with a resource type or javax.jms.ConnectionFactory. I now want to access this from a client application on my local machine for this I have the following: public static void main(String[] args) { try{ Properties env = new Properties(); env.setProperty("java.naming.factory.initial", "com.sun.enterprise.naming.SerialInitContextFactory"); env.setProperty("java.naming.factory.url.pkgs", "com.sun.enterprise.naming"); env.setProperty("java.naming.factory.state", "com.sun.corba.ee.impl.presentation.rmi