473,320 Members | 1,820 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

rmi server shuts down

oll3i
679 512MB
Why my rmi server shuts down? when i run it it starts and then shuts down

here is the server code
Expand|Select|Wrap|Line Numbers
  1. import java.util.Properties;
  2. import javax.naming.InitialContext;
  3. import javax.rmi.PortableRemoteObject;
  4.  
  5. import PhoneDirectory.PhoneDirImpl; 
  6.  
  7. /**
  8.  * Creates a Server and binds the RMI Servant with the IIOP Registry
  9.  * 
  10.  * 
  11.  */
  12. public class PhoneDirServer { 
  13.  
  14.   static final String CONTEXT_NAME = "java.naming.factory.initial";
  15.   static final String IIOP_STRING  = "com.sun.jndi.cosnaming.CNCtxFactory";
  16.  
  17.   static final String URL_NAME = "java.naming.provider.url";
  18.   static final String IIOP_URL_STRING  = "iiop://localhost:1000";
  19.  
  20.   /**
  21.    * Entry Point to this application
  22.    */
  23.   public static void main(String[] args) { 
  24.     try {
  25.  
  26.       // Create the Object
  27.       PhoneDirImpl myObject = new PhoneDirImpl(); 
  28.  
  29.       // Create the IIOP Initial Context
  30.       Properties iiopProperties = new Properties();
  31.       iiopProperties.put( PhoneDirServer.CONTEXT_NAME, 
  32.                           PhoneDirServer.IIOP_STRING );
  33.       iiopProperties.put( PhoneDirServer.URL_NAME, 
  34.                           PhoneDirServer.IIOP_URL_STRING );
  35.       InitialContext iiopContext = new InitialContext( iiopProperties );
  36.  
  37.       // Bind the object to the IIOP registry
  38.       iiopContext.rebind( "Phone Directory", myObject );
  39.  
  40.       System.out.println( "Hello from server"); 
  41.     }
  42.     catch ( Exception exception ) {
  43.       exception.printStackTrace ();
  44.     }
  45.   } 
  46. }
  47.  
  48.  
  49.  
  50.  
  51.  
thank you
May 21 '07 #1
0 1018

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Brian | last post by:
Hello I am using version 4.0.12-nt of MySQL and when I hit the enter key rapidly I can't connect to the database. The result is a message is returned to me from mysql that says I can't connect...
2
by: Ken Lindner | last post by:
I have a need to become familiar with SQL Server 2000 for work. Needless to say I am new to SQL Server any version, but not IT in general. My employer has provided me with the SQL Server 2000...
19
by: Thue Tuxen Sørensen | last post by:
Hi everybody ! I´m maintaining a large intranet (approx 10000 concurrent users) running on one IIS box and one DB box with sqlserver 2000. Currently there is 2,5 GB Ram, 1 1400 mhz cpu and 2...
3
by: Aaron | last post by:
how do i write a script like this? if dllhost.exe's cpu usage is greater than 90% then run iisreset end if Thanks in advance, Aaron
5
by: Richard | last post by:
Hi, I have a form that take some time to load due to many comboboxes and at least 8 subforms. When I filter or sort the main form I get an error message and then Access shuts down. They ask if...
5
by: brianbasquille | last post by:
Hello all, Any reason why a program would simply shut down when a MessageBox.Show() is issued? Strange behaviour as the MessageBox never actually pops up.. but running through the debugger...
3
by: wwwmike | last post by:
Problem: When my provider shuts down the SQL Server IIS receives a few error messages and then switches the site to 'SERVICE UNAVAILABLE'. Before IIS kills itself it is friendly enough to send me...
1
by: TC | last post by:
I'm experiencing an unusual problem. When I run a specific make-table query on a computer, that computer shuts down. The computer shuts down completely, without warning, as if a power failure...
2
by: =?Utf-8?B?YW5ub3llZCB3aXRoIHZpc3Rh?= | last post by:
I have a new Toshiba Satellite laptop. It came with Vista and IE 7. When I close an Exporer window (using the X in the corner) I get a message that says "Internet Explorer has stopped working and...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.