Xinyi Zhang

Ranch Hand
+ Follow
since Apr 28, 2001
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Xinyi Zhang

Thank you, Ernest. Your post is very helpful.
20 years ago
I guess this is a thread issue. See this simple JApplet

import javax.swing.JApplet;
import javax.swing.JButton;
import javax.swing.SwingUtilities;

public class SimpleJApplet extends JApplet {

public void init() {
try {
GUIThread guiThread = new GUIThread();
SwingUtilities.invokeLater(guiThread);
} catch (Exception e) {
e.printStackTrace();
}
}

public void createGUI() {
getContentPane().add(new JButton("Button Two"));
}

class GUIThread implements Runnable {
public void run() {
createGUI();
}
}

}

It displays the GUI in the browser after first loaded, when I refresh the page. Sometimes it displays sometimes not.

import javax.swing.JApplet;
import javax.swing.JButton;


public class SimpleJApplet2 extends JApplet {

public void init() {
getContentPane().add(new JButton("Button One"));
}

}


But using event dispatching thread is recommended. What is wrong with the first piece of code?
[ November 19, 2004: Message edited by: Xinyi Zhang ]
20 years ago
I have an applet, which runs well in JBuilder - embeded in a JSP pages that runs on Tomcat. I copy and paste the URL to IE browser, it sometimes display the applet, most of times not. What can this problem is?

Thanks
20 years ago
I have a class implements javax.servlet.ServletContextAttributeListener, then register the listener class in web.xml. My question is how to register a lister in JSP?

Thanks
20 years ago
JSP
I got it. It was weblogic.jar

Now the question is: After getting the reference to MBeanServer on the managed server instance, I tried to register my custom DynamicMBean, it throws the exception,


javax.management.ReflectionException: The MBean class could not be loaded by the default loader repository
at weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:108)
at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:138)
at weblogic.management.internal.RemoteMBeanServerImpl_812_WLStub.createMBean(Unknown Source)
at wlTest.WLMBeanServerTest.registerMyTestMBean(WLMBeanServerTest.java:104)
at wlTest.WLMBeanServerTest.main(WLMBeanServerTest.java:53)

Even I tried to register the example DynamicMBean from Sun JMX 1.2 RI. It still failed. Why?
20 years ago
I want to register my MBeans to WebLogic's MBeanServer. The WebLogic documentation says I can use MBeanHome in WebLogic API to get MBeanServer instance. My questions is where to find WebLogic API, the jar file? Which jars are quired for JMX applications in WebLogic?

Thanks,
20 years ago
Please help, config in MQSeries.

1) I defined TCF and T in JMSAdmin, created control queue and stream queue with MQ command. Now the broker queue are visible in MQ browser. How can I define Topics in MQ browser.

2) Please give some samples of using WebSphere as naming service provider. My JMS client program is a regular Java class, WebSphere's naming.jar has already been added into classpath. The following code doesn't work.
Hashtable env = new Hashtable();
env.put(Context.PROVIDER_URL, "iiop://localhost:9001");
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.ibm.websphere.naming.WsnInitialContextFactory");
InitialContext context = new InitialContext(env);
I tried the JAX-RPC sample in Sun's WS tutorial with WSDP 1.3. The hello-jaxrpc.war doesn't work in Tomcat. It reports a listener error. Anybody successfully run the sample?I didn't build the program with ANT. I used wscompile, jar and wsdeploy command instead.
20 years ago
No. 15
Toronto, Canada
[ April 26, 2004: Message edited by: Xinyi Zhang ]
I got result at 3:06 ET from Sun's cert site. Passed.

I received my new voucher and tried to use it, but it also showed an expiration date of February 25th when I tried to reschedule.


I am experiencing the same thing.
I sent email to [email protected]. No response. I think I have no chance to reschedule.
I don't know how to use rmic in WSAD 5. I didn't find any RMI related context menus. Anybody knows? Thanks.
21 years ago
How to list tables in specific database and how to find field name and its data type using Java program? Thanks.
I have a byte[] bytes, from
new String(bytes); I got the correct string.
But from new String(bytes, "UTF-8"); I got the result "0". Why?
21 years ago