Prem Kumar

Greenhorn
+ Follow
since Jan 29, 2006
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
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Prem Kumar

Hi

The exception that you get is probably because there are no
default properties for the JNDI Server you are using.Try modifying your
code like this. Also make sure you have j2ee.jar in your classpath.

Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,
"com.sun.enterprise.naming.SerialInitContextFactory");
env.put(Context.PROVIDER_URL,
"localhost:1099");
Context initialContext = new InitialContext(env);
Dear Friends
We have requirement to update all the clients if some data changes
in the server.An example is given below. User A has listed all books
on a particular topic.(Swing Client).User B (Administrator ) adds another book on the same category.In such a situation the server should refresh all connected clients.So that User A immediatly sees the new book.

For this kind of a requirement what should be the best approach .
Which is better - a JMS Solution or RMI Solution. Pls give your thoughts
My suggestion is there is some thing wrong with the code that
you have posted.

This is your code

InitialContext ic = new InitialContext(ht);
Object o = ic.lookUp("mybean");
MYHome home = (MYHome)PortableRemoteObject.narrow(obj,obj.getClass());//

I Changed it like this

InitialContext ic = new InitialContext(ht);
Object o = ic.lookUp("mybean");
MYHome home = (MYHome)PortableRemoteObject.narrow(o,MYHome.class);//

Try out this.
Hi

There are no JSP Pages.This is not a webapplication.We are using http tunneling to allow internet users to access the application using java thick clients.If we tunnel through IIS there is a a reduction in response time.With out IIS the response time is 1 sec and with IIS it is 15 minutes.
I think there is some issue with the communication between IIS and Weblogic using the iisproxy plugin.
14 years ago
Dear Friends,

We are trying to allow internet users to connect to our server using a java swing client.For this we enabled http tunneling and we routed all the requests through the IIS Server (specific request from our customer).We are using the iisproxy provided by BEA.
We are facing a lot of issues.

[1] Long delay- It takes 10 minutes to process a simple request.
[2] Some times we can see RJVM exception in the weblogic server.

We are using weblogic 8.1 SP3 and IIS 5.1

Did any of you faced such issues ? .Pls share your experiance.
Any help is really appreciated.

Thanks
Prem
14 years ago
A Procedure may or may not return a value.By default it wont return any thing.You have to make it return some value by the use of OUT or IN/OUT parameter.

Function will return a value by default.
I found the issue.It was done by some classes in weblogic.jar.If you give
this jar to the classpath ,it automatically generates a stub for the remote object.So thats how the callback worked.it was using the stub generated by some classes in weblogic.jar.
IIOP Is the protocol used by CORBA.EJB uses RMI over IIOP protocol.
So Corba Clients can talk to EJB using IIOP.Thats all it means.
This is the issue with the classpath.set the classpath to the jar.
You can find the name in the build.xml and you can change it to another name.
Hi Friends

I would like to what are things i need to consider on choosing whether
i should go for servlet with helper classes or servlet with session beans.
The client is always web (jsp).

Thanks
Prem
Hi Friends,

I am wondering how call back happens in EJB.
I created an interface called CallBack.This extends Remote.
This contains a method update(String msg).

CallBack extends Remote {
void update(String msg) throws RemoteException;
}

Then to my ejb i pass this interface as shown below.
public void register(CallBack callback) {
try {
if(callback!=null) {
callback.update("Msg from Server");
}
}catch(RemoteException e){
e.printStackTrace();
}
}
I created a client which implements the CallBack interface and i called
the ejb's register method.Surprisingly i got a message from the server.
How does this work. Normally in RMI for the call back to work the client
should also expose itself as a RMI Server.This is usually done by
UnicastRemoteObject.exportObject(client);After this you use rmic to generate the stub and skeleton classes. For the EJB case i didnt export the client with exportObject nor i generated any stub and skeleton. How was the ejb able to call back the client in this scenario.Sorry for the long mail

Thanks
Hi all,

I know we have a Generic Servlet and a HttpServlet.HttpServlet is specific to HTTP Protocol.Generic Servlet is not specific to HttpProtocol.
So what should i do i want to locate a servlet with out using http protocol { i dont want to use the http://servername/contextRoot/URLPattern }.Is there any way to access a GenericServlet with out the above mentioned method.

Thanks
14 years ago
Hi all,

I know we have a Generic Servlet and a HttpServlet.HttpServlet is specific to HTTP Protocol.Generic Servlet is not specific to HttpProtocol.
So what should i do i want to locate a servlet with out using http protocol { i dont want to use the http://servername ort/contextRoot/URLPattern }.Is there any way to access a GenericServlet with out the above mentioned method.

Thanks
14 years ago
Hi Friends,

I am wondering how call back happens in EJB.
I created an interface called CallBack.This extends Remote.
This contains a method update(String msg).

CallBack extends Remote {
void update(String msg) throws RemoteException;
}

Then to my ejb i pass this interface as shown below.
public void register(CallBack callback) {
try {
if(callback!=null) {
callback.update("Msg from Server");
}
}catch(RemoteException e){
e.printStackTrace();
}
}
I created a client which implements the CallBack interface and i called
the ejb's register method.Surprisingly i got a message from the server.
How does this work. Normally in RMI for the call back to work the client
should also expose itself as a RMI Server.This is usually done by
UnicastRemoteObject.exportObject(client);After this you use rmic to generate the stub and skeleton classes. For the EJB case i didnt export the client with exportObject nor i generated any stub and skeleton. How was the ejb able to call back the client in this scenario.Sorry for the long mail

Thanks