IntelliJ Java IDE
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes arguments in Remote Home interface methods Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Professional Certification » EJB Certification (SCBCD/OCPJBCD)
Reply Bookmark "arguments in Remote Home interface methods" Watch "arguments in Remote Home interface methods" New topic
Author

arguments in Remote Home interface methods

Mikalai Zaikin
Ranch Hand

Joined: Jun 04, 2002
Posts: 2989
Is it possible to define primitive arguments in
remote home interface methods ?
For example : EJB 2.0 specification, page 112

I'm quite unsure that there is error in specification. But I have read that
all arguments and returning types have to be serializable to be transferred over network (RMI calls). And primitives obviously can not implement serialazable
Maybe I have some mess in my head, sorry for confusing.
Thanks a lot.


Free SCDJWS 5.0 Study Guide - SCDJWS 5.0 Quiz (How to get SCDJWS 5.0 Quiz)
Java Platform, Enterprise Edition 6 Web Services Developer Certified Expert Exam Study Guide and Quiz [in progress...]
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8845

yes primitives are allowed in remote home interfaces and they can be transported across the network.


Groovy
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8845

System.out.println(int.class instanceof java.io.Serializable);
prints true
hover cheng
Ranch Hand

Joined: Feb 11, 2003
Posts: 66
I think it is the same to the valid instance varibles of STATEFUL session beans. They can be primitive types although the specification does not explicitly define it in "7.4.1 Instance passivation and conversational state"
Regards,


SCJP 91% SCJD 94% SCBCD 98% SCWCD1.4 86%<p>XML141 SCDWJS -- in progress<br />If you don't retreat, you are mostly among those who can surmount it.
Vishwa Kumba
Ranch Hand

Joined: Aug 27, 2003
Posts: 1064
System.out.println(int.class instanceof java.io.Serializable);
prints true ?
Does this stmt print true for all java classes and primitive types suffixed with .class?
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8845

First of I want to say that my 2nd post has got nothing to do proving that primitives are serializable.
System.out.println(int.class instanceof java.io.Serializable);
return true because Class implements Serializable.
http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Class.html
So the statement is true for all objcets class and also primitives.
Regarding the original question - All primitives are serializable.
 
 
subject: arguments in Remote Home interface methods
 
Threads others viewed
Bean Lookup Using Custom Constructor
urgent
Error while Deploying BMP bean
Deploying CMP2.0 on Websphere5.0
create method in stateful session bean
developer file tools

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture