Jianfeng Qian

Ranch Hand
+ Follow
since Jan 25, 2005
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
(keep public parts private until JForum day)
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt
Moderation Tools

Recent posts by Jianfeng Qian

Is there a beta for SCJP 6.0?
Or the beta time is over?
Is there any other beta exams available?
thanks.
How to deploy a sar or war to root in jboss?
10 years ago
My team develop a tool just like jboss.
I try to deploy a war in the deploy fold.
When I use eclipse to run, it deployed successfully.
But when I run run.bat,
It shrows such exception
InitialContextFactoryImpl.class is in a jar in the lib fold,not inside the war.
Does anyone have any idea about the problem? thanks
-----------------------------------------------------------------
2007-08-23 22:12:46 INFO [WEBAppDeployer] [deploy] start deploy web app: wsrf
javax.naming.NoInitialContextException: Cannot instantiate class: org.***.InitialContextFactoryImpl [Root exception is java.lang.ClassNotFou
ndException: org/***/InitialContextFactoryImpl]
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6
57)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:175)
at org.***.TomcatWebContainer.bindReference
(TomcatWebContainer.java:314)
at org.***.TomcatWebContainer.doDeploy(Tomc
atWebContainer.java:256)
at org.***.AbstractWebContainer.deploy(Abst
ractWebContainer.java:86)
at org.***.deployer.WEBAppDeployer.deploy(WEBAppDeployer
.java:68)
at org.***.WEBApp.deploy(WEBApp.java:378)
at org.***.AppDeployService.run(AppDeployService.java:26
9)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.ClassNotFoundException: org/***/Initial
ContextFactoryImpl
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:242)
at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.jav
a:42)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6
54)
... 10 more
10 years ago

Originally posted by Satou kurinosuke:
Please do not crosspost between several forums. Thank you.
http://www.coderanch.com/t/364330/Servlets/java/servlet-information-Server



Sorry about that.
I didn't know it was not permit.
Can administers delete it or close it?
when the app server started.
I wander that does the servlet and app server in the same jvm ?
10 years ago
My app Server integrates with tomcat.
there is a ServerAdmin.java
public class ServerAdmin {

static ConcurrentHashMap servers = new ConcurrentHashMap();
......
}

I have a serverlet HttpServerServlet.java
I want to use ServerAdmin.servers in the Servlet,but it always is empty.
When I run the app Server in Jbuilder, the Servlet can get the ServerAdmin.servers
Do I make it clear ?
My app Server integrates with tomcat.
there is a ServerAdmin.java
public class ServerAdmin {

static ConcurrentHashMap servers = new ConcurrentHashMap();
......
}

I have a serverlet HttpServerServlet.java
I want to use ServerAdmin.servers in the Servlet,but it always is empty.
When I run the app Server in Jbuilder, the Servlet can get the ServerAdmin.servers
Do I make it clear ?
10 years ago
I want to get some static field of the the Server object.
such as a servlet get some information fo the tomcat
or the app server.
Does anyone have some idea?
I want to get some static field of the the Server object.
such as a servlet get some information fo the tomcat
or the app server.
Does anyone have some idea?
10 years ago
How about ask sun for more information?
I didn't find out the problem with your code.

But I try my code and it work.

In my way,
Create a Queuesender implements MessageListener
send a message to the queue and listen to the tempqueue.

Create a Queuereciever implements MessageListener
listen to the queue and send a message to the tempqueue.

I donn't know whether it can satisfy your purpose.
Does it work?
I think you should use JNDI to lookup a ConnectionFactory instead of new one by yourself.
Some information from javax.jms.ConnectionFactory
"Although the interfaces for administered objects do not explicitly depend on the Java Naming and Directory Interface (JNDI) API, the JMS API establishes the convention that JMS clients find administered objects by looking them up in a JNDI namespace.
"