[EJB/JBoss] - javax.naming.NameNotFoundException while looking up the sess
by uday.madigatla
Hi I'm using myeclise as IDE....,I created one EJB project. My ejb project name is Test. So my ear name is "Test", Ejb project name is "TestEJB" and werbmodule name is "TestWeb". It was deployed succesfully in Jboss 5.0GA Every thing was Ok up to this.
In my Web module project i created a Client.java program in order access the session beans. Here is my client.java program
package client;
import java.util.Properties;
import javax.naming.Context;
import javax.naming.NamingException;
import sessionbeans.SaveInternalUserRemote;
import entityBeans.InternalUser;
public class Client {
public static void main(String args[]) throws NamingException
{
Properties prop=new Properties();
prop.put(Context.PROVIDER_URL,"jnp://localhost:1099");
prop.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
prop.put(Context.URL_PKG_PREFIXES," org.jboss.naming:org.jnp.interfaces");
Context jndiContext= new javax.naming.InitialContext(prop);
System.out.println(jndiContext);
System.out.println(jndiContext.getClass().getName());
SaveInternalUserRemote saveInternal=(SaveInternalUserRemote)jndiContext.lookup("Test/SaveInternalUser/remote");
InternalUser user=new InternalUser();
user.setName("Uday");
user.setName("ukma");
user.setDescription("Uday");
saveInternal.saveUser(user);
}
}
When i try to run this i'm getting this exception....
Exception in thread "main" javax.naming.NameNotFoundException: Test/SaveInternalUser/remote
at org.jboss.ha.jndi.TreeHead.lookup(TreeHead.java:242)
at org.jboss.ha.jndi.HAJNDI.lookup(HAJNDI.java:155)
at sun.reflect.GeneratedMethodAccessor87.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.ha.framework.server.HARMIServerImpl.invoke(HARMIServerImpl.java:209)
at sun.reflect.GeneratedMethodAccessor86.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
at sun.rmi.transport.Transport$1.run(Transport.java:159)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown Source)
at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
at sun.rmi.server.UnicastRef.invoke(Unknown Source)
at org.jboss.ha.framework.server.HARMIServerImpl_Stub.invoke(Unknown Source)
at org.jboss.ha.framework.interfaces.HARMIClient.invokeRemote(HARMIClient.java:219)
at org.jboss.ha.framework.interfaces.HARMIClient.invoke(HARMIClient.java:321)
at $Proxy0.lookup(Unknown Source)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:528)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:507)
at javax.naming.InitialContext.lookup(Unknown Source)
at client.Client.main(Client.java:22)
Then bold one is the error line. What should i use as lookup name for session bean..
Is there any jar file need to add for this.
Please help me in this. i was really require this in order to proceed further..
Thanks in advance
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4225333#4225333
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4225333
17 years
[JBoss Messaging] - JDBC persistence speed
by desbonns62
hello,
I did few tests of JbossESB with a MySQL DB persistence. With my configuration, the performances are divided by 50 between the typical hsqldb configuration and the MySQL persistence.
This is due to the long time that MySQL takes to write a new row.
I would like to know if there is a way to "concatenate" a certain number of messages before writting on database? In this way the duration of store, for example, 10 concatenated messages will be quite the same that the time needed for a single message. The final speed will be 10 times higher.
Today I do it manually: I added some specific code to my client that wait 10 messages and send them all in a concatenate string. I do the same operation with the receiver.
Thanks for your help and please ask me if you need more info.
Simon
My configuration:
Windows XP Pro
JBossESB-4.5.GA --> Jboss messaging 1.4.0.SP3 included
MySQL 5.1
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4225324#4225324
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4225324
17 years