glassfish

SimpleFormatter ignoring the java.util.logging.SimpleFormatter.format property

无人久伴 提交于 2019-12-17 13:55:11
问题 I'm using java.util.logging on GlassFish 4. I'm defining my own class to initialize the LogManager by defining the System property: -Djava.util.logging.config.class . My class loads the logging.properties file, merges it with some other property file and does some custom replacement. The following is the relevant part of my logging.properties file: java.util.logging.FileHandler.pattern=C:/Work/server/glassfish/domains/domain1/logs/JMSFileHandler%g.log java.util.logging.FileHandler.limit

SimpleFormatter ignoring the java.util.logging.SimpleFormatter.format property

你。 提交于 2019-12-17 13:54:22
问题 I'm using java.util.logging on GlassFish 4. I'm defining my own class to initialize the LogManager by defining the System property: -Djava.util.logging.config.class . My class loads the logging.properties file, merges it with some other property file and does some custom replacement. The following is the relevant part of my logging.properties file: java.util.logging.FileHandler.pattern=C:/Work/server/glassfish/domains/domain1/logs/JMSFileHandler%g.log java.util.logging.FileHandler.limit

Using the context-root from glassfish-web.xml in GlassFish 3

那年仲夏 提交于 2019-12-17 09:54:41
问题 We recently switched to Glassfish 3.1.2.2 and have several Web-Applications packaged as war files. At times the desired context-root for these applications differs from the filename. Back when we used Weblogic we achieved this by declaring the context-root in the weblogic.xml like this <context-root>path/to/our/App</context-root> We noticed that the same Tag exists in the glassfish-web.xml. But no matter what we define there, the server always determines the filename as the context-root. Now

Location of GlassFish Server Logs

微笑、不失礼 提交于 2019-12-17 07:25:55
问题 I have NetBeans IDE installed on a Windows 7 64-bit machine. Obviously, NetBeans comes with the GlassFish server. I am currently having problems with a project and would like to check the server logs. Where are these stored please? 回答1: In general the logs are in /YOUR_GLASSFISH_INSTALL/glassfish/domains/domain1/logs/ . In NetBeans go to the "Services" tab open "Servers", right-click on your Glassfish instance and click "View Domain Server Log". If this doesn't work right-click on the

How do I specify the JDK for a GlassFish domain?

牧云@^-^@ 提交于 2019-12-17 04:59:50
问题 I've got GlassFish 2.1.1 installed. I have a 1.5 and a 1.6 JDK installed. Even though my JAVA_HOME variable is set to the 1.5 version (and both "java -version" and "javac -version" display 1.5), whenever I start my glassfish domain it always states at the top of the log that its using version 1.6. How can I override this? Starting Domain domain2, please wait. 04-May-2012 08:38:47 com.sun.enterprise.admin.servermgmt.launch.ASLauncher buildCommand INFO: C:/Dev/jdk/1.6/1.6.0_19\bin\java 回答1:

JDBC MySql connection pooling practices to avoid exhausted connection pool

a 夏天 提交于 2019-12-17 01:04:12
问题 I have a Java-JSF Web Application on GlassFish, in which I want to use connection pooling. Therefore I created an application scoped bean that serves with Connection instances for other beans: public class DatabaseBean { private DataSource myDataSource; public DatabaseBean() { try { Context ctx = new InitialContext(); ecwinsDataSource = (DataSource) ctx.lookup("jdbc/myDataSource"); } catch (NamingException ex) { ex.printStackTrace(); } } public Connection getConnection() throws

Glassfish - debug JDBC connection pool behavior

烂漫一生 提交于 2019-12-14 03:51:57
问题 If I have a JDBC connection pool (datasource) in Glassfish, is there a way I can log debugging info like when it creates a new connection vs. using a pooled one? In particular I'm trying to troubleshoot the connection validation process, and not sure if that's causing new physical connections to be created. Thanks! 回答1: You can monitor your application resources through the server console. Go to server > Monitor > Resources and see the stats of your application Example below: 来源: https:/

Glassfish not display JSF components

半腔热情 提交于 2019-12-14 03:14:25
问题 On my index.xhtml I have Java Server Face components which are displayed correctly and use a managed bean. But if I link to any other page or even a page with the EXACT same code those pages will not display these components, only the text. Suppose index.xhtml is like this and displays correctly: <?xml version='1.0' encoding='UTF-8' ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999

Netbeans not keeping added server after restart

时间秒杀一切 提交于 2019-12-14 02:32:29
问题 When I add a new server (glassfish) or another, it works just fine. I can startup the server and deploy apps on it. But, every time I restart netbeans the added servers are not there. It means I must add servers every time I open netbeans. I'm using netbeans7. Thanks. 回答1: Well, it is not happening any more on netbeans 7.2. If it was a bug, it has been fixed. 来源: https://stackoverflow.com/questions/6269461/netbeans-not-keeping-added-server-after-restart

“Web Services” Node is absent in GlassFish Server Open Source Edition 3.0.1

情到浓时终转凉″ 提交于 2019-12-14 02:12:05
问题 I can't see the "Web Services" Node (Menu Item in the Tree-like menu that GF admin console has on its left side) in glassfish's admin console. Is there a way to enable it in glassfish? Should I download any upgrades for glassfish to enable it? 回答1: Short answers: No and no. Longer answer: There have been a fair number of changes in the Admin Console between GlassFish Server 2.x and 3.x. There is no explicit node in the tree in 3.x. Most of the data that was available in the tree has been