Lucy C

Ranch Hand
+ Follow
since Feb 09, 2000
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Lucy C

u mean the j2ee has both application server & DBMS server
in build with in it

Yup. If you download it, you'll get lots of documentation explaining exactly what's included and how to use it. The server is a reference implementation of the J2EE platform standard. The SDK also includes a Cloudscape DBMS server.
J2EE is not something you use instead of the standard Java 2 SDK - it's something you use in addition to it. It provides you with the APIs you need to build enterprise applications, eg servlets, EJB. It also includes a fully-working server that you can use to test J2EE applications, together with a DBMS.
OK. The codebase is, basically, a URL (file, HTTP, or FTP) where the RMI Class Loader can look for any classes it needs (eg a stub class, or the class code for any serialized parameters the client recieves) that aren't in the local classpath. You set the codebase property for your server, and then the information is added to the stream each time a serialized object is sent to the client.
So, in your example, you can do this by running the HelloServer with the -Djava.rmi.server.codebase=(whatever your codebase is) flag. For instance, you could set the codebase to the document root of your HTTP server and put the appropriate stub class files there. (If you use a file URL, the classes can only be downloaded by a client that has access to your server's local file system.)
You also need to use a security manager to do this type of dynamic class loading, and also create an appropriate security policy - the default one doesn't give enough permissions to use RMI. You can find out how to do this in the Java Tutorial RMI bit, as far as I remember...
Hope that's helpful.
[This message has been edited by Lucy C (edited May 31, 2000).]
20 years ago
Hmmm, just reinstalled J2EE on another machine and everything worked perfectly. Oh well.
(stomps off, muttering dire things about Windows NT)
Does anyone know if the JSP engine can use a BeanInfo class when using a JavaBean? I've just been writing getter and setter methods according to the design patterns til now.
20 years ago
I'd go for the Monson-Haefel book as well, I thought it explained the concepts very well and was extremely clear and helpful.
Hi - I've just installed the newest (1.2.1) version of J2EE on my NT machine. I can get the server to run ok, and I've been trying to follow the step-by-step example in the documentation using deploytool. Everything is fine (setting up my JAR, adding it to an EJB application, etc.) until I try to actually deploy my bean, whereupon I get a RemoteException saying that the server could not find javac!! There's a bug listed in the Known Bugs list which says that deployment problems can occur if you have a standalone JRE, which is an option on some platforms. As far as I know, I don't have this (I even tried reinstalling my SDK 1.3 just to check, and it wasn't offered as an option). I'd really like to get this to work and would appreciate any help.

>The SCJD does not specifically cover J2EE technologies and is a bit old hat. SCJA is
being upgraded to cover J2EE hence it's suspension and I hope the same will happen to
Hmm, so maybe I should wait, then.
I'm an SCJP, but I don't have a lot of real-world Java development experience, which was why I was thinking of doing the SCJD to show that I could complete a proper programming project. I do, however, know a bit about some of the J2EE technologies (currently wrestling with EJB) and I wouldn't mind being able to demonstrate this in an exam.
Um, replies should just appear beneath your question. Like this one.
20 years ago
Alas, the only service provided by the Java IDL ORB is the Naming service - after that you're on your own (it is, however, free).
20 years ago
I'm with Tom - I found RMI (designed as a Java-to-Java system) very straightforward to learn, and it's a good way to pick up a lot of distributed computing concepts that are also used in CORBA. If you do want to go on and learn CORBA, you could try and do the same exercise Tom suggested, this time accessing the remote method using CORBA. I used the very basic Java IDL ORB provided in the Java 2 SDK to practice (the relevant packages all start with org.omg.).
You might also like to try using RMI-IIOP, which allows RMI applications to communicate with remote CORBA objects using the CORBA network protocol - this gives you the benefits of using CORBA (it doesn't matter what language the remote object is written in) while being almost as simple to write as plain old RMI. The necessary compiler and API are included in the 1.3 version of Java 2, and there's a good tutorial on converting your RMI apps to RMI/IIOP on the Sun site (I think).
20 years ago
Yep, factory classes mean that you only have to register a single object with the rmiregistry. A factory class has, as you describe, at least one method that returns a server object. As this is an RMI server object, it must implement at least one interface that extends Remote. The clever bit depends on how RMI handles remote method parameters and return types: if a Remote object is returned from an RMI remote method call, what's actually returned to the caller is a stub for that object (if the returned object was Serializable, the caller would get a serialized copy instead). So when the client calls the remote getUserControl() method, it gets back a stub for the remote UserControl created on the server, just like it would get back from the rmiregistry by calling lookup. The client can then use this stub to call methods on the UserControl. Ta da!
20 years ago
Um, yes, you should be reading it. I didn't get any questions on what I knew about the documentation in my exam, but it's an invaluable resource for checking things with regard to all the exam objectives.
But developer exam is
more valued out there because You are given an assignment and there is programming

Hmmm, that's what I suspected. I passed the SCJP recently (with a very good score, though I say so myself ), and I've been thinking about doing the developer exam. I don't do (much) development in work (I mostly do tech. writing), and I'd like to have something to show that I can actually write working code. Glad to know my RMI knowledge could be useful...
You can, of course, convert or cast an int to a long - but you can't convert or cast an array of ints to an array of longs. Remember that an array is an object! If an array is of primitive types, it can only be cast or converted to an array of the same primitive types, Object, or Cloneable. However, if you have an array of object references, you can follow the same casting and conversion rules as you use for object references.