473,791 Members | 2,807 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

rmi server shuts down

oll3i
679 Contributor
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 1047

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

Similar topics

2
2541
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 because the database is down. If I only hit the 'enter' key once (to execute the page that my queries are on(their are four queries on this particular web page)) my queries execute just fine. We have noticed that this only happens when we:
2
15230
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 Personal disk from the SQL Server 2000 Enterprise kit as this is reported here on the MSDN web site to be the version that is supported on Windows XP. In fact so many of you kind people confess to having succeeded in doing it. I have tried...
19
14850
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 scsi disks installed on the db box. Sqlserver is set to use max 1,4 GB RAM, and the sqlserver does not seem to be using it all.
3
280
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
3092
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 I want to send the error report to Microsoft. Has anybody seen this type of error message and what can I do to prevent it from happening. Am I doing something illegal in my code? It used to work but I have added conditional formatting to a subform...
5
1499
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 shows it fails and shuts down at the line when the MessageBox.Show() is issued. Bear in mind i am working with GDI+
3
5473
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 an error message. ****ERROR MESSAGE 1****** System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the...
1
1630
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 occurred. I can run the query without any trouble on other computers. I can also run other queries on this computer, including make-table queries which create much bigger tables. When it works (on other computers), the make-table query creates a...
2
2824
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 windows is trying to fix the problem" It thinks for a few seconds and then another box dialog box pops up and says "Internet Explorer is restarting" It then shuts down every IE window I have open and restarts. I also found that it does that...
0
9669
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9515
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10426
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10154
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7537
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6776
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5430
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4109
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2913
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.