[Installation, Configuration & DEPLOYMENT] - Deploying Non-Java Files with Application
by JoPe
My EJB3 application is configured by a Java .properties file. Running locally, it works fine. I can put the .properties file into the same directory as the class using it or in any other directory in the Eclipse project and provide the path to it as a String, like this:
| protected static Properties storedTypes = new Properties();
|
| public static void loadTypes() throws FileNotFoundException, IOException, ClassNotFoundException
| {
| storedTypes.load(new FileInputStream("types.properties"));
| ...
|
But when I deploy the application, I always get a FileNotFoundException. What I've tried so far:
1. Putting the .properties file into the same directory as the class file (within the deployment jar file), using either only the file name as path or the path from the deployment directory (i.e. the package structure).
2. Unzipping the jar file to a directory called MyApplication.jar and trying the steps above.
3. Putting the .properties file into the conf directory, and using conf/xyz.properties as path.
4. Putting the .properties file directly into the deploy directory and using only the filename as path.
5. Creating a new directory in the deploy directory and putitng it in here.
Nothing works, I keep getting a FileNotFoundException.
I just can't imagine there is no way to use config files in a JBoss web application. Of course, I don't want to use absolute paths like C:/myConfigFiles.
Does anyone know how to do this?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4142466#4142466
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4142466
18 years
[Management, JMX/JBoss] - Re: Securing JMX console (JBoss)
by PeterJ
If Quality Center by Mercury has JBossAS embedded within it, then simply stop and restart Quality Center to restart JBossAS.
To find out the version number, look for a file named boot.log within a directory named log. In a typical JBossAS installation this will be at JBOSS_HOME/server/default/log, but I am not familiar with Quality Center so do not know where it would appear there. (Actually, since you know the location of the web.xml file for the JMX Console, the log file should be at ../../../log/boot.log, relative to web.xml.) There should be a line like this:
15:34:48,025 INFO [Server] Release ID: JBoss [Trinity] 4.2.2.GA (build: SVNTag=JBoss_4_2_2_GA date=200710221139)
By the way, JBoss is not a program, it is a trademark of RedHat and a brand name used on a number of products, including JBoss Application Server (JBossAS). Many people (incorrectly) refer to JBossAS as simply JBoss. I have also seen people use the trem "JBoss" to refer to JBoss Portal, JBoss Messaging, JBoss Webs Server, etc. You could say I'm picky, but I try to never use the term JBoss by itself because of this ambiguity, preferring to refer to the product name (or at least the shortened form).
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4142461#4142461
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4142461
18 years