ravinderSingh singh

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

Recent posts by ravinderSingh singh

Hi,

I know that to JAR a single bean component you use a command similiar to (assuming all the component interfaces + bean class are in the com/classes/beans/one directory):

jar cf my_jar_file.jar com/classes/beans/one/*.class META-INF/ejb-jar.xml

However, if I also have another bean component in the directory com/classes/beans/two how can I modify the JAR utility to include this component also?

Thanks
That should be ok.

Just to clarify, JTS is java's implementation of the OMG's Object Transaction Service (OTS) and is used to support the JTA?
Hi,

I'm trying to understand the various transaction API's used in EJB.

I understand that the Java Transaction Service (JTS) is java's implementation of the OMG's Object Transaction Service (OTS) but I don't understand where the Java Transaction API (JTA) fits in to the whole picture?

Thanks...
Hi,

I'm confused as to the relation between EJB and CORBA. Some books I've read say that CORBA is used to implement the underlying RMI protocol in EJB while others say it is an alternative to EJB.

Could someone please clarify.

Thanks
Hi all,

I understand, from reading various literatures, that RMI enables a java object's methods to be called by some remote host.

What I wanted to know was does RMI provide any other types of services such as transaction management, security etc?
18 years ago
Thank you. I've searched the web and it's difficult to find a standard definition.

Just to clarify, any ejb I develop is a component since aspects of its behaviour can be configured at run-time using xml attributes?
I recently heard some describe EJBs as a component model. When I looked up the term component model I couldn't seem to find a definition.

Could anyone please explain to me what a component model is?

Thank you!!
Hi all,

I've got to make a case to my employer for why we should consider investing in Java and (specifically) EJB technologies as opposed to other technologies such as .NET.

Does anyone know of any articles, websites, journals etc that explain why it is benefical to develop applications using EJBs?

Thank you!!!
Hi,

Yeah, I copied the above code exactly from the run method of my thread. A method invoked latter (on the remote interface) does use a member variable of the thread but that isn't until after the ClassCastException is thrown.
Thanks for the reply.

I understand your point but I need to transfer/store/retrieve a file (uploaded through a HTML form) onto the server on which my EJBs reside so that the file in question can be accessed by any application with access to the EJBs.

I didn't think there would be any other way to achieve this than to pass the stream contain the file data to the EJB method.

Is it not possible to make ServletOutputStream serializable?
18 years ago
Yes, it is the exact name of the home interface.

The three classes/interfaces all reside in the package com.beans and have the following names:

BeanEJB --> Remote Interface
BeanEJBHome --> Home Interface
BeanEJBBean --> Bean implementation
I executed the above 4 statements are here's what resulted:

1) com.beans.BeanEJBBean_l6o3nb_HomeImpl_WLStub
2) false
3) weblogic.utils.classloaders.GenericClassLoader@3d1402
finder: weblogic.utils.classloaders.MultiClassFinder@646128
4) weblogic.utils.classloaders.ChangeAwareClassLoader@523632
finder: weblogic.utils.classloaders.MultiClassFinder@268a10

Here's the full exception that is thrown:
java.lang.ClassCastException: Cannot narrow remote object to com.beans.BeanEJBHome.
Hi,

I have to pass a parameter to an ejb method which is an instance of ServletOutputStream. However, this class is not serializable so how can I make it so that it can be passed successfully?

Thanks!!
18 years ago
Thanks for clarifying the problem (the code is in a web WAR archive but I'm assuming the same applies).

Is there any work around since I need a certain EJB method to be invoked at a certain point in time (I'm using the Timer and TimerTask classes)?

Thank you!
Hi,

I previously had the following fragment of code inside a servlet (which worked fine):

Context ctx = new InitialContext();
BeanEJB beanEJB = null;
BeanEJBHome beanHome = null;

Object obj = ctx.lookup("ejb/BeanEJB");
beanHome = (BeanEJBHome ) PortableRemoteObject.narrow(obj, BeanEJBHome.class);

However, I moved the above code to the run() method of a new thread I created and now the PortableRemoteObject.narrow() call throws a ClassCastException.

Can anyone help?

Thank you!