[JBoss-user] How can I use a properties file?

2001-04-19 Thread Sam Liu



Hi,

In ejb project(include .war file), Can i use a properties file?
because I think properties file is convenient.
if i can use a properties file, where can i put it? and how can i use it
in a java file?

thanks,

Sam Liu.


http://lists.sourceforge.net/lists/listinfo/jboss-user  
‹,™Šx%ŠI‹,–+-.ŸaX(~ŠzwXŠb?,


re: [JBoss-user] Why can not I use my mySQL data source?

2001-04-05 Thread Sam Liu

thanks to danch, when I use Jboss2.1 beta, all of things are OK.
thanks to Ken Jenks.



in addition:
   Perhaps it is a silly problem.
   I want to know why  the file "jboss.conf" and other likewise ***.conf  files
use the format of  XML? but when I comment this line in jboss.conf like this:

MLET CODE = "org.jboss.util.ClassPathExtension" ARCHIVE="jboss.jar" 
CODEBASE="../../lib/ext/"
  !-- Comment by Sam Liu
  ARG TYPE="java.lang.String" VALUE="../../../jakarta-tomcat-3.2.1/lib/"
   --
  ARG TYPE="java.lang.String" VALUE="../../../tomcat/lib/"
  ARG TYPE="java.lang.String" VALUE="Tomcat"
/MLET

i found that jboss can not start up tomcat. 
that is to say ***.conf do NOT support XML parsering.

when I correct it like this:
   
MLET CODE = "org.jboss.util.ClassPathExtension" ARCHIVE="jboss.jar" 
CODEBASE="../../lib/ext/"
 
  !-- ARG TYPE="java.lang.String" VALUE="../../../jakarta-tomcat-3.2.1/lib/" --

  ARG TYPE="java.lang.String" VALUE="../../../tomcat/lib/"
  ARG TYPE="java.lang.String" VALUE="Tomcat"
/MLET

it is OK.


So, if all of the files of "***.conf" can be parsered on html or xml format, 
perhaps is it better?  

--- origional info--

First, I assume you're running JBoss 2.0? If you're running 2.1/2.2, the
config is a little different.
...


‹,ºÇ«™¨¥Šx%ŠËI‹,ºÇ«–+-²Ê.­ÇŸ¢¸ëa¶ÚþX¬¶Ë(º·~Šàzw­þX¬¶ÏåŠËbú?º,²ë


re: [JBoss-user] Problem about Servlet calling ejb

2001-04-03 Thread Sam Liu

thanks to Ken Jenks!

but I can still not run this Servlet.

In fact I have ever used the jndi name "interest/Interest"
just like that your article had  refered to.
And after i run jndiView.jar, I can find that : "interest/Interest"
if I use client application to call the Interest bean, all OK.


When I use jboss2.0-final, the Servlet output correct result.
but the client application do not run rightly, however it is not 
my concern.

I guess that the Interest Bean had been deployed rightly.
but the servlet can not find the ejb by the jndi name.

I hope your help again!

(I have download the JBoss_tomcat.zip, the instructions tell me no need to config.)

best regard,

Sam Liu




Your debugging string, sHome, indicates that you got an InitialContext(), 
but that there was probably an exception when you tried to get a reference 
to the Interest bean (because you never did get to the line which sets 
sHome = "2"). I suspect that means that your Interest bean is not deployed, 
or if it is deployed, it has a different name under JNDI namespace.

Change to the jboss/bin directory and run this command:

java -jar jndiView.jar | more

(You should put that in a script or batch file. In fact, this script/batch 
file should be part of the standard distribution.)

If the Interest bean is deployed, you should see its name listed.

Check the jBoss log and see if there's an exception during deployment. If 
you don't see one, you can change the logging MLET code in 
jboss/conf/default/jboss.conf:

MLET CODE = "org.jboss.logging.ConsoleLogging" ARCHIVE="jboss.jar" 
CODEBASE="../../lib/ext/"
ARG TYPE="java.lang.String" VALUE="Information,Warning,Error"
ARG TYPE="java.lang.String" VALUE="[{2}] {4} {1} {3}"
/MLET

(See how I added {1} and {3}.)

MLET CODE = "org.jboss.logging.FileLogging" ARCHIVE="jboss.jar" 
CODEBASE="../../lib/ext/"
ARG TYPE="java.lang.String" VALUE="Information,Debug,Warning,Error"
ARG TYPE="java.lang.String" VALUE="[{2}] {4} {1} {3}"
/MLET

(Again, I added {1} and {3}.)

Now look at the window from which you ran jBoss or file jboss/log/server.log.

-- Ken Jenks, http://abiblion.com/

Tools for reading.


___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user$,²ë®f¢–)à–+-$,²ë®X¬¶Ë(º·~Šàzw­†Ûiÿùb²Û,¢êÜyú+éÞ·ùb²Û?–+-Šwèþ6è²Ë¬z


re: [JBoss-user] Problem about Servlet calling ejb

2001-04-03 Thread Sam Liu

thanks to Ken!

Oh, I have just find how to run the Servlet rightly.
I am under windows 2000
If I run "run.bat " all is OK,
but I always run "java -jar run.jar", so I can not get it.

that is to say, we must put the "run.jar" in the CLASSPATH.

Sam Liu.
2001/04/04  
‹,ºÇ«™¨¥Šx%ŠËI‹,ºÇ«–+-²Ê.­ÇŸ¢¸ëa¶ÚþX¬¶Ë(º·~Šàzw­þX¬¶ÏåŠËbú?º,²ë


re: [JBoss-user] Problem about Servlet calling ejb

2001-04-03 Thread Sam Liu

thanks, I have solved it !

Sam Liu
===
 [EMAIL PROTECTED]

 origional mail-

I guess that the Interest Bean had been deployed rightly.
but the servlet can not find the ejb by the jndi name.

Something I didn't cover in my original "Interest Bean" servlet article was 
how to map an EJB's name to a jBoss JNDI name using jboss.xml. You can 
change the names like this:

?xml version="1.0" encoding="ISO-8859-1"?

jboss
 securefalse/secure
 container-configurations /
 resource-managers /
 enterprise-beans
 entity
 ejb-nameInterest/ejb-name
 jndi-nameinterest/Interest/jndi-name
 configuration-name/configuration-name
 /entity
 /enterprise-beans
/jboss

Name this file jboss.xml and put it in the same directory as ejb-jar.xml 
and you can call your beans anything you want.

-- Ken Jenks, http://abiblion.com/

Tools for reading.


___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user$,²ë®f¢–)à–+-$,²ë®X¬¶Ë(º·~Šàzw­†Ûiÿùb²Û,¢êÜyú+éÞ·ùb²Û?–+-Šwèþ6è²Ë¬z