glassfish-3

what is difference between glassfish configuration, server, instance and cluster?

萝らか妹 提交于 2019-12-21 21:10:37
问题 following is a paragraph from glassfish 3.1.2.2 administration guide You can rotate log files manually by using the rotate-log subcommand in remote mode. The default target of this subcommand is the DAS. Optionally, you can target a configuration, server, instance, or cluster .You can rotate log files manually by using the rotate-log subcommand in remote mode. The default target of this subcommand is the DAS. Optionally, you can target a configuration, server, instance, or cluster. what is

Glassfish taking 20s to do hot deployment, is that right?

痴心易碎 提交于 2019-12-21 17:24:47
问题 I'm working in a JSF project with Eclipse and Glassfish 3.1.2 . Every time I did a minor change and save it, Glassfish do the hot deployment , but is taking too much time to do that, about 20s , at least. Can I do something do deacrease this time ? Is horrible develop something where you have to wait all time time everytime I change something. UPDATE This is how my project settings. Just open the folder below, this surprise me, is this so many .jar files, is this correct ? And this one: My

How can I increase memory allocated to GlassFish?

爷,独闯天下 提交于 2019-12-21 12:08:38
问题 I would like to increase my memory allocation to my GlassFish instance. Could anyone please help me out. Your answer could be via the admin console or the command line, I don't mind. 回答1: You can add the -Xmx and other properties in the admin console as described here. 回答2: Find a file domain.xml which you are using, i.e. /usr/local/glassfish-4.1/glassfish/domains/domain1/config/domain.xml (if using Linux you can use "locate domain.xml" (if you have mlocate installed and do "sudo updatedb").

What does “org.hibernate.DuplicateMappingException” error mean?

强颜欢笑 提交于 2019-12-21 07:15:34
问题 I'm trying to force JPA/Hibernate to generate and use only lowercase tablenames. I've implemented a NamingStrategy like this: public class MyNamingStrategy extends DefaultNamingStrategy { @Override public String classToTableName(String className) { return super.classToTableName(className).toLowerCase(); } } I have applied it by setting this property in persistence.xml: <property name="hibernate.ejb.naming_strategy" value="entities.strategy.MyNamingStrategy"/> When I do this I get this

Customizing an Elastic Beanstalk AMI

有些话、适合烂在心里 提交于 2019-12-20 20:37:53
问题 I need to use on Elastic Beanstalk a Java application written for Glassfish server. Beacuse of Amazon doesn't let me choose an AMI with Glassfish, I choosed one with Tomcat and i modified my application to work properly on Tomcat. Now, I've seen I also needed to use a Sun JDK, while by default Elastic Beanstalk AMI comes with openjdk. I googled a lot, finding some (not so many resources) interesting posts like this answer on StackOverflow What I can't understand is this part of the answer:

How to create custom 404 messages in JSF 2.0?

人盡茶涼 提交于 2019-12-20 17:32:53
问题 Currently in my app when a user types some illegal destination in the URL bar, sees this: I would like to make it more beautiful and customize it with my own markup and a bit of css. -Do i need to program that on my app or i have to configure that in the application server? -Where should i start from if i want to do that? 回答1: You can declare custom <error-page> s in web.xml depending on <error-code> (the HTTP status code) or <exception-type> (the full qualified exception class name which was

How to create custom 404 messages in JSF 2.0?

自古美人都是妖i 提交于 2019-12-20 17:31:10
问题 Currently in my app when a user types some illegal destination in the URL bar, sees this: I would like to make it more beautiful and customize it with my own markup and a bit of css. -Do i need to program that on my app or i have to configure that in the application server? -Where should i start from if i want to do that? 回答1: You can declare custom <error-page> s in web.xml depending on <error-code> (the HTTP status code) or <exception-type> (the full qualified exception class name which was

Java EE 6 - Embedded container EJB tests

≡放荡痞女 提交于 2019-12-20 10:57:16
问题 This questiong is regarding Java EE 6 , using glassfish v3 embedded-all . I have a unit test that uses EJBContainer to test my stateless EJB. Problem is I'm having trouble looking up the EJB (remote) using JNDI: setup() { ctx = EJBContainer.createEJBContainer().getContext(); } ... test() { BookService bookService = (BookService)ctx.lookup("java:global/BookServiceEJB!com.something.service.BookService"); ... } @Stateless public class BookServiceEJB implements BookService { ... } @Remote public

WAR doesn't get redeployed in Glassfish from autodeploy

淺唱寂寞╮ 提交于 2019-12-20 03:11:43
问题 I was able to deploy my WAR the first time I placed it under domains/domain1/autodeploy dir. However, after making some changes and redeploying the WAR to the autodeploy dir, the changes were not picked up. I even deleted domains/domain1/applications/myapp (where myapp corresponds to the myapp.jar being deployed) but the WAR was not redeployed. The server was started and stopped via asadmin : asadmin start-domain asadmin stop-domain What am I doing wrong so that the app does not get

Automatic EJB Timer on Glassfish Server not triggering

落爺英雄遲暮 提交于 2019-12-20 01:59:13
问题 So I'm running a Java EAR application on a Glassfish 3.1. I created a stateless session bean with a single annotated timer function in my EJB Module. I don't have the exact code but it looks something like this: @Stateless public class SessionTimerBean { public SessionTimerBean(){ System.out.println("Constructor Called"); } @Schedule(second="*/10", minute="*", hour="*") public void scheduleTimer(final Timer t) { System.out.println("Timer Called"); } } When I launch Glassfish the debug info