Leopard CUPS Server - CUPS 1.1 clients
Hello,
I would like to print from CUPS 1.1 clients to a CUPS server running on Leopard 10.5.2.
The CUPS 1.1 clients are not capable of using utf-8 characters.
Updating the clients is not possible.
lpstat -a
I get on the client:
lpstat: get-printers failed: client-error-bad-request
On the server:
Unsupported character set "iso-8859-1"!
How can I fix this? Or should I wait for an update?
Regards.
Petra Humann
We hit the exact same issue, the exact same bug, but had an additional manifestation as described in the bug details - users not able to be migrated from inactive to active.
TAC got in and fixed the database and it fixed the spurious logs for us, too. Thanks for the feedback!
Similar Messages
-
Replace Snow Leopard Server OS on Mini Server with Snow Leopard non-Server?
I have a Mid-2010 Mini Server which came preinstalled with Snow Leopard Server. I'm wondering if anyone has had experience with attempting to replace the OS-X Server software with OS-X non-Server in order to run Parallels for the Desktop. If this worked, then one should be able to re-install the OS-X Server software as a client using Parallels. Parallels states that it supports OS-X Server as a client, but the real question is whether one can install the OS-X (non-server) on a Mini which came with the OS-X Server software installed.
Hi
Your problem is going to be finding a Client OS that will actually boot and install on the MacMini:
http://support.apple.com/kb/HT2186
http://support.apple.com/kb/HT1159
According to MacTracker the build version of OSX Server 10.6.3 shipping with the MacMini Servers is 10D2235. It may work if you have a comparable client that's fully updated to 10.6.4. One way of finding out is to target disk mode an appropriately updated mac to the MacMini Server. If you can, select the System on that unit as the Startup Disk and see if it boots and works successfully with no kernel panics.
Tony -
I don't know much about computers can anyone walk me through this ? How Do I Change The Software Update Server Address On A Client ? what do I open and how do i put it in the right spot?
The simplest method is to run a defaults command on the client Macs (easily pushed via Apple Remote Desktop):
defaults write com.apple.SoftwareUpdate CatalogURL 'HTTP_URL_FOR_CATALOG'
for a user. If you run it via sudo it will set it for whenever you use softwareupdate as root.
The HTTP_URL_FOR_CATALOG has been changed with Mac OS X 10.6. If you use MCX it will automatically pick the new catalog – however if doing it manually the following URLs need to be used for whichever client version is in question:
Mac OS X 10.4: http://mysus.example.com:8088/index.sucatalog
Mac OS X 10.5: http://mysus.example.com:8088/index-leopard.merged-1.sucatalog.sucatalog
Mac OS X 10.6: http://mysus.example.com:8088/index-leopard-snowleopard.merged-1.sucatalog
Mac OS X 10.7: http://mysus.example.com:8088/index-lion-snowleopard-leopard.merged-1.sucatalog
Mac OS X 10.8: index-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog
To double check this applied you can run the following command:
/usr/libexec/PlistBuddy -c Print /Library/Preferences/com.apple.SoftwareUpdate.plist
and /usr/libexec/PlistBuddy -c Print ~/Library/Preferences/com.apple.SoftwareUpdate.plist
to see what settings are for the computer and user appropriately.
If this is working correctly when running Software Update (GUI) you should see the server address appear in parenthesis in the title of the window.
MCX
Another alternative is to use Workgroup Manager to manage the preferences via MCX from your server. This can be done for users, or for computers if they are bound to your Open Directory.
If you are using 10.5 Server or newer: you can simply use the Software Update section under Preferences.
Manually:
Choose the accounts, computers, or groups to have the preference applied to.
Click on Preferences, and then the Details tab
Press the Add… button and navigate to /Library/Preferences/com.apple.SoftwareUpdate.plist
Press Edit…
Under Often, add a New Key and enter the name CatalogURL
Make sure the type is string and then enter your SUS URL (eg. http://mysus.example.com:8088/index.sucatalog or if using 10.6: http://mysus.examle.com:8088/ – see above from the defaults section)
Press Apply Now, then Done. Once users/computers have refreshed their MCX settings (usually the next login or restart) the new settings will take over.
If this is working correctly when running Software Update (GUI) you should see the server address appear in parenthesis in the title of the window.
In order to have a system-wide configuration one has to run the following:
sudo defaults write /Library/Preferences/com.apple.SoftwareUpdate CatalogURL "http://your.updates-server.lan:8088/index.sucatalog"
In order to correctly work both on Leopard and Snow Leopard the right command to issue is:
defaults write /Library/Preferences/com.apple.SoftwareUpdate CatalogURL "http://your.updates-server.lan:8088/index-leopard-snowleopard.merged-1.sucatalog"
Happily used and tested on my network
The DNS trick that Chealion points out is fantastic. I use it at our office, and every computer on our LAN will automatically pull the updates from the local repository at high speed without any configuration.
Create the swscan.apple.com DNS zone on your internal DNS server, and have it resolve via an A record to your Mac
Tags: automaticupdates mac clients macosx setting as default software update
Category: Serverfault
Share
0
0
Google +
0
0
0
5
You might also like:
Can I Update My Jb 4s To 6.1.2 Without Restore? Tue. Jan 21st, 2014
Iphone 4 Not Charging After Update To IOS6
IPad 2 Not Updating To IOS 5.1
How To Resolve The â€âunable To Install Update†Error For OTA IOS Updates?
What Is â€âSoftware Update†Doing When It Says â€âChecking For New Softwareâ€?
Advertisement
Comment
- See more at: http://www.eonlinegratis.com/2013/how-do-i-change-the-software-update-server-add ress-on-a-client-mac-to-use-my-own-server/#sthash.YhHp5zWk.dpuf -
SnowLeopard Server not providing Lion clients software updates
Hi everyone,
I've seen countless threads with the same problem and there doesn't seem to be any response whatsoever from Apple on this issue so I'm hoping someone else can shed some light on this issue..
I configured my Snow Leopard Server (10.6.8) to provide Lion client updates on my network as per the instructions and it's just not working!
My Lion clients are currently running 10.7 and I'm looking to get them updated as quickly as possible. If I cant resolve this I'll be putting them back to Snow Leopard - I knew I'd regret installing Lion!
swupd.plist:
<key>otherCatalogs</key>
<array>
<string>index-leopard.merged-1.sucatalog</string>
<string>index-leopard-snowleopard.merged-1.sucatalog</string>
<string>index-lion-snowleopard-leopard.merged-1.sucatalog</string>
</array>
swupd.conf
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} Darwin/9
RewriteRule ^/index\.sucatalog$ /index-leopard.merged-1.sucatalog
RewriteCond %{HTTP_USER_AGENT} Darwin/10
RewriteRule ^/index\.sucatalog$ /index-leopard-snowleopard.merged-1.sucatalog
RewriteCond %{HTTP_USER_AGENT} Darwin/11
RewriteRule ^/index\.sucatalog$ /index-lion-snowleopard-leopard.merged-1.sucatalog
</IfModule>
Clients:
mbpro:~ Barry$ defaults read /Library/Preferences/com.apple.SoftwareUpdate CatalogURL
http://sus.domain.com:8088/index-lion-snowleopard-leopard.merged-1.sucatalog
On my clients I am receiving the following:
The Software Update Server (sus.domain.com) is not responding.
Check to make sure your network connection is operating normally. If there are no issues with your connection, contact your network administrator for assistance.
And if I look on Server Admin, searching for "10.7" none of those updates are copied/enabled and I can't see any OS Combo Updates?!? This has been set-up for a few days now and still nothing.
If I try to access the sucatalog url in a browser I receive a 403, forbidden error. If I do the same for say the snowleopard catalog URL I am able to view the catalog.. Permission error somewhere perhaps? Although I'm more inclined to believe that I'm unable to view the contents of this file as there are simply no 10.7 updates in the sus repository.
Oh! and it's worth mentioning that Snow Leopard clients are able to make use of the Software Update Server..
Appreciate any input
Thanks!Hi,
I'm really sorry but because it was a while back I can't quite remember. I should have posted it in my response above, I hate when people don't do that!
If you need me to check any of my particular config I'd be more than happy to have a look -
SUS on 10.6 server for 10.8 clients?
With the move of software update to the Mac App store in Mountain Lion, will SUS on 10.6 server update 10.8 clients?
Not test yet, but if you have a test environment, you can try the following way based on http://support.apple.com/kb/HT4771, the lines marked bold are for Mountain Lion clients, good luck.
1. Update your server to Mac OS X Server v10.6.8.
2. Stop the Software Update service if it is running.
3. Quit Server Admin if it is active.
4. Update /etc/swupd/swupd.plist to begin hosting OS X Lion software updates. (See details below.)
5. Update /etc/swupd/swupd.conf to allow OS X Lion computers to receive updates. (See details below.)
6. Open Server Admin and start the Software Update service.
7. Use the instructions in Mac OS X Server v10.6: Using the Software Update service with multiple Mac OS X client versions to point your OS X Lion clients to this server.
In step 4, you will need root access to update the file /etc/swupd/swupd.plist. To be safe, make a backup copy of the file before editing it. Add the string in bold below to the otherCatalogs array:
otherCatalogs
index-leopard.merged-1.sucatalog
index-leopard-snowleopard.merged-1.sucatalog
index-lion-snowleopard-leopard.merged-1.sucatalog
index-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog
Note: You can edit the file using a text or property list editor, or use the single command below to make the change.
sudo /usr/libexec/PlistBuddy -c 'add :otherCatalogs:2 string index-lion-snowleopard-leopard.merged-1.sucatalog' /etc/swupd/swupd.plist
sudo /usr/libexec/PlistBuddy -c 'add :otherCatalogs:3 string index-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog' /etc/swupd/swupd.plist
In step 5, you will need root access to update the file /etc/swupd/swupd.conf. To be safe, make a backup copy of the file before editing it. Locate the following line near the end of the file:
RewriteCond %{HTTP_USER_AGENT} Darwin/11
RewriteCond %{HTTP_USER_AGENT} Darwin/12
Edit the following line to read:
RewriteRule ^/index\.sucatalog$ /index-lion-snowleopard-leopard.merged-1.sucatalog
RewriteRule ^/index\.sucatalog$ /index-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog -
ASA 5505 as a SSL VPN Server and Easy VPN Client at the same time?
Is it possible to configure and operate the ASA 5505 as a SSL VPN server and Easy VPN Client at the same time? We would like to configure a few of these without having to purchase additional ASA 5505 and use a 2 device method (1 SSL VPN Server and 1 Easy VPN Client). Thanks in advance.
I don't think it is possible. Following links may help you
http://www.cisco.com/en/US/products/ps6120/products_configuration_guide_chapter09186a008068dabe.html
http://www.cisco.com/en/US/products/ps6120/products_configuration_example09186a008071c428.shtml -
Connect SQL Server 2012 from Windows Server 2003 with native client 9.0
Hi,
I currently have a setup where ETL tool Ab Intio, running on a Linux server, connects to the SQL Server 2005 through a passthrough Wintel server with Windows Server 2003 OS using SQL server native client 9.0
Now I have the requirement to upgrade the SQL server from 2005 to 2012.
My question is, will it be possible to connect to SQL server 2012 through Windows Server 2003 with native client 9.0?
As per the specs, I need native client 11.0+ to fully support SQL Server 2012, but then, as per specs, native client 11.0 doesnot run on Windows server 2003. OS upgradation is currently not on the cards.
So will it be possible to the run the basic queries we use currently, if we can connect SQL server 2012 through Windows Server 2003 with native client 9.0/10.0, without updgrading the OS of the Wintel server?
Thanking you in advance!Hi Soumya,
Yes, you can use the SQL Server Native Client shipped with SQL Server 2005 to connect to a SQL Server 2012 instance, and there is no need to upgrade the operating system.
Regards,
Mike Yin
TechNet Community Support -
Connect & Update a Server DB from remote Client
I'm a novice as far as Java Technologies. I would like to create a Java program and publish it to a remote client using Java Web Start. What I need to be able to do is update a SQL Server database, located on my local server, from the remote client. Can anyone tell me if this can be done? And if so, how to do it?
Don't know if SQL Server as a pure jdbc driver supporting net clients (you should ask in some jdbc forum). Anyway you can use for sure jdbc over odbc. Everything else is a pure java/jdbc problem.
Any question about Java Web Start & JNLP? -
How to get the user input while server is waiting for client's message
I have a server/client program (using sockets)
I used a thread to let a server always waiting for client's request, but how should I found that
there is no message pass to server from client.
public void run(){
while (true){
Socket server = serverP.accept();
ObjectInputStream inFromClient = new ObjectInputStream(server.getInputStream());
inMessage = (Message)inFromClient.readObject();
System.out.println("Deadlock may occurred, please enter your command: ");
BufferedReader inFromUser = new BufferedReader(new InputStreamReader(System.in));
String command = inFromUser.readLine();
The server is waiting for the inMessage that is passed from multiple clients. But if the server
received no message after some time, it will assume something is wrong (eg, there is a
deadlock), then it will ask the user to input the command to execute the method.
If I put
"System.out.println("Do you want to take Snapshot: ");
BufferedReader inFromUser = new BufferedReader(new InputStreamReader(System.in));
String command = inFromUser.readLine();"
inside the while loop, it will keep asking user to enter the input when every time the client
connect to the server. But I want to ask the user to enter the command only when the server
can't get the response from clients.
How should I do?
Please help.Your statement:
Socket server = serverP.accept();
it will block until Server receive connect request from client.
So, what u can do is, create a seperate Thread which check if server is idle (no client connect to it) for a certain time.
public class xxxxx extends Thread {
public void run(){
(new WatcherThread()).start()
while (true){
Socket server = serverP.accept();
WatcherThread.acceptFlag();
ObjectInputStream inFromClient = new ObjectInputStream(server.getInputStream());
inMessage = (Message)inFromClient.readObject();
Do something with client request ...
I suggest you to create a WorkerThread for
each client request.
For example:
new (WorkerThread(inMessage)).start();
This way, your server thread will immediately serve
the next client request ASAP.
public class WatcherThread extends Thread {
private static accept = false;
public static void acceptFlag() {
flag = true;
public void run() {
while(true) {
try { sleep(10000); } catch (Exception ex) { }
if (!accept) { // never accepted after 10000 msecs
... do your System.in here ...
flag=false;
}The idea is, your server notify WatcherThread if a client connect. WathcerThread runs at seperate thread. It waits for 10000 msecs and check if Server ever gets connect request from server. If it doesn't then you can do your System.in, otherwise, it will wait for 10000 again..
FYI, next time, please use [ code ] and [ / code ] to format your code. It discourage me to read plain whole-left-aligned code like yours.
See: http://forum.java.sun.com/features.jsp#Formatting
rgds,
Alex -
Implementation Options: Server Side Object Model & Client Side Object Model
Hi All, I'm design a custom web application and it will be deploy on SharePoint 2010/2013 (to be confirmed) server, and I found some aritical as follows:
http://consultingblogs.emc.com/sanjaypatel/archive/2011/09/17/comparison-between-server-side-object-model-client-object-model-rest-api-s-and-decision-matrix-on-what-to-use-when.aspx
May I ask ask your advice for following items?
1) Is the above URL still valid? e.g. Vice Versa for SharePoint 2013?
2) Microsoft has a phase out plan for server side object model or not? (e.g. MOSS 202X)
3) For programmatcally update of SharePoint permission: should I call client-side OM instead of server-side OM even I will deploy the web application to SharePoint server?
Thank you very much.
.NET Beginner 3.5In sharepoint 2013 I don't think this link is
http://consultingblogs.emc.com/sanjaypatel/archive/2011/09/17/comparison-between-server-side-object-model-client-object-model-rest-api-s-and-decision-matrix-on-what-to-use-when.aspxis reliable at all.
what is your say?
====================================================
Hi All, I'm design a custom web application and it will be deploy on SharePoint 2010/2013 (to be confirmed) server, and I found some aritical as follows:
http://consultingblogs.emc.com/sanjaypatel/archive/2011/09/17/comparison-between-server-side-object-model-client-object-model-rest-api-s-and-decision-matrix-on-what-to-use-when.aspx
May I ask ask your advice for following items?
1) Is the above URL still valid? e.g. Vice Versa for SharePoint 2013?
2) Microsoft has a phase out plan for server side object model or not? (e.g. MOSS 202X)
3) For programmatcally update of SharePoint permission: should I call client-side OM instead of server-side OM even I will deploy the web application to SharePoint server?
Thank you very much.
.NET Beginner 3.5 -
Hi, i have a client running on WLS 5.1, and i have to connect to a
server running on WLS 6.0 I got back following
error:
javax.naming.CommunicationException [Root exception
is
weblogic.socket.Unrecover ableConnectException:
[Login failed:
'Incompatible version:Incompatible versions
- this server:6.0.0b2
client:5.1.0]]
I have tried to run a standalone client (outside
WLS) using classes from
WLS 6.0 and it works.
When i have tried to add the weblogic.jar (of
6.0) to the
WEBLOGIC_CLASSPATH of 5.1, i got the following
error:
Unable to initialize server: java.lang.ClassCastException:
weblogic.rmi.internal .BasicRuntimeDescriptor
fatal initialization
exception java.lang.ClassCastException:
weblogic.rmi.internal.BasicRuntimeDescriptor
at
weblogic.rmi.internal.DescriptorManager.resolveClass(DescriptorManage
r.java:59) at
weblogic.rmi.internal.DescriptorManager.getDescriptor(DescriptorManag
er.java:36) at
weblogic.rmi.internal.DescriptorManager.getDescriptor(DescriptorManag
er.java:27) at
weblogic.rmi.extensions.BasicServerObjectReference.<init>(BasicServer
ObjectReference.java:48) at
weblogic.rmi.extensions.BasicServerObjectAdapter.<init>(BasicServerOb
jectAdapter.java:42) at
weblogic.rmi.extensions.BasicRequestHandler.<init>(BasicRequestHandle
r.java:30) at
weblogic.rmi.extensions.BasicRequestDispatcher.<init>(BasicRequestDis
patcher.java:41) at
weblogic.rmi.internal.OIDManager.initializeServer(OIDManager.java:272
) at weblogic.rmi.internal.OIDManager.initialize(OIDManager.java:251)
at weblogic.kernel.Kernel.ensureInitialized(Kernel.java:141)
at
weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:1111)
at
weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:827)
at
java.lang.reflect.Method.invoke(Native Method)
at
weblogic.Server.startServerDynamically(Server.java:99)
at
weblogic.Server.main(Server.java:65) at
weblogic.Server.main(Server.java:55)
Can anyone help me?
thanx and regards marcoI do not have this information. However, your BEA sales rep can provide you
more information on release dates and availability of new
functionality/features.
Hope this helps,
Robert
"trond strømme" wrote:
Any clues as to when this service pack will be out?
.trond stromme, mogul technology.
"Robert Patrick" <[email protected]> wrote in message
news:[email protected]..
Please do not cross post (or post multiple times).
This has been a problem with WLS for years in that major versions are not
interoperable. I believe that they are targeting providing this
interoperability in an upcoming service pack release for WLS 5.1leveraging the
RMI/IIOP work done in WLS 6.1.
Gottfried Szing wrote:
hi
i try to connect a JMS queue hosted on WLS 6.1 from within a WLS5.1 but
i
receive always the same error message (see below). so what can i do to
solve this problem?
Exception in thread "main" javax.naming.CommunicationException. Root
exception is weblogic.socket.UnrecoverableConnectException: [Loginfailed:
'Incompatible version:Incompatible versions - this server:6.0.0b2
client:5.1.0]
at weblogic.socket.Login.checkLoginSuccess(Login.java:77)
at weblogic.socket.JVMSocketT3.connect(JVMSocketT3.java:85)
atweblogic.socket.JVMAbbrevSocket.connect(JVMAbbrevSocket.java:160)
<!-- schnipp schnapp -->
szing@ispdev1# -
Connection between oracle 9i server and oracle 9i client
hi there,
i have installed both oracle 9i server and oracle 9i client in my system.how can i connect these two to have connection between these server and client?
Because i was using only 9i server for creating database and for other purposes.i have not used 9i client yet.
Please write me the answer.
Thanks in advance.Hi Balu,
If you have the Oracle 9i Client, you can just edit your TNSNAMES.ora file of your client to have a TNS Entry for your new Database & try connecting it. You just need to try TNSPING & ensure that you can reach the Listener.
Are you facing any specific problems ?
Regards,
Sandeep -
Connect to Oracle 9i server using oracle 11g client
Hi,
my oracle 9i server is on unix machine.
I got new Window 7 64 bit machine for .NET code development(framework 4.0).It is having Oracle 11G installed.I am getting oracle connection error while running .NET application.
what changes (connection string/tnsnames.ora/others) will I have to do to connect Oracle 9i server using oracle 11g client ?Hi,
Please post the complete error stack you are getting.
Regards
Yoonas -
Some methods are displaying the result on the server instead on the client.
When I test (form SeatReservationClient class) the method sri.showReservations() located in SeatReservationClient class the results are being displayed on the server side instead on the client but the method sri.numReservations() is displaying the result as i want it i.e. on the client. Please can anyone help me (as always on this forum) find a solution to this problem and display the results correctly?
I have 5 classes:
Interface
public interface SeatReservationInterface extends java.rmi.Remote
public boolean isReserved(int row, int seat) throws java.rmi.RemoteException;
public boolean reserve(int row, int seat) throws java.rmi.RemoteException;
public boolean cancel(int row, int seat) throws java.rmi.RemoteException;
public int numReservations() throws java.rmi.RemoteException;
public void showReservations() throws java.rmi.RemoteException;
Implementation
public class SeatReservationImpl extends java.rmi.server.UnicastRemoteObject implements SeatReservationInterface
private Seat[][] theatre;
* Implementations must have an explicit constructor in order to declare the RemoteException
* exception.
* Theatre constructor makes a new movie theatre with numRows rows and numSeats
* seats (chairs) in each row. All seats are unreserved (unoccupied) in the beginning.
public SeatReservationImpl(int numRows, int numSeats) throws java.rmi.RemoteException
theatre = new Seat[numRows][numSeats];
for(int row = 0; row <theatre.length; row++)
for(int col = 0; col<theatre[row].length; col++)
theatre[row][col] = new Seat();
* The method returns true if the seat at location (row, seat) is reserved.
* The method returns false in all other cases.
* Be careful that row numbers run from 1 to numRows, and seat numbers from
* 1 to numSeats.
public boolean isReserved(int row, int seat) throws java.rmi.RemoteException
return theatre[row-1][seat-1].isOccupied();
* Books the seat at location (row, seat) and returns true if that seat is available.
* Returns false if that seat is already reserved.
public boolean reserve(int row, int seat) throws java.rmi.RemoteException
return theatre[row-1][seat-1].occupy();
* Cancels a seat reservation at location (row, seat) is that seat was booked, and returns
* true in that case. The method returns false if that seat had not been reserved.
public boolean cancel(int row, int seat) throws java.rmi.RemoteException
return theatre[row-1][seat-1].release();
* Returns the number of reserved seats.
public int numReservations() throws java.rmi.RemoteException
int count = 0;
for(int i = 0; i < theatre.length; i++)
for(int j = 0; j < theatre[j].length; j++)
if(theatre[i][j].isOccupied())
count++;
return count;
* Prints an overview over all reservations. Reserved seats are shown as "*", available seats
* as "-". For each row the row number is shown, then a couple of blanks, and then the
* reservations. An example is
* 8 -----****----
* 7 ---**---**---
* 6 ----***------
* 5 -------------
* 4 -------------
* 3 ----------***
* 2 **-------
* 1 -------------
public void showReservations() throws java.rmi.RemoteException
for(int row = theatre.length-1; row>=0; row--)
System.out.print((row+1) + "\t");
for(int j = 0; j<theatre[row].length; j++)
if(theatre[row][j].isFree())
System.out.print("-");
else
System.out.print("*");
System.out.println();
return;
[i]Server import java.rmi.Naming;
public class SeatReservationServer
public SeatReservationServer()
try
SeatReservationInterface sri = new SeatReservationImpl(10, 5);
Naming.rebind("rmi://localhost:1099/SeatReservationService", sri);
catch (Exception e)
System.out.println("Trouble: " + e);
public static void main(String args[])
new SeatReservationServer();
Client
import java.rmi.Naming;
import java.rmi.RemoteException;
import java.net.MalformedURLException;
import java.rmi.NotBoundException;
public class SeatReservationClient
public static void main(String[] args)
try
SeatReservationInterface sri = (SeatReservationInterface) Naming.lookup("rmi://localhost/SeatReservationService");
/* Make two reservations */
System.out.println("Reservations:");
System.out.println("1,2");
System.out.println("1.3");
System.out.println("1,4");
sri.reserve(1,2);
sri.reserve(1,3);
sri.reserve(1,4);
System.out.println("The Seat is occupied - " + sri.isReserved(1,2));
System.out.println("The Seat is occupied - " + sri.isReserved(1,3));
System.out.println("The Seat is occupied - " + sri.isReserved(1,4));
/* Show the theatre */
sri.showReservations();
/* Release a seat that had been booked */
System.out.println("Release seat row 1 seat 2");
sri.cancel(1,2);
System.out.println("The Seat is occupied - " + sri.isReserved(1,2));
/* Show the number of total reservations and the theatre */
System.out.println("Number of reservations: " + sri.numReservations());
sri.showReservations();
catch (MalformedURLException murle)
System.out.println();
System.out.println("MalformedURLException");
System.out.println(murle);
catch (RemoteException re)
System.out.println();
System.out.println("RemoteException");
System.out.println(re);
catch (NotBoundException nbe)
System.out.println();
System.out.println("NotBoundException");
System.out.println(nbe);
catch (java.lang.ArithmeticException ae)
System.out.println();
System.out.println("java.lang.ArithmeticException");
System.out.println(ae);
Class containing instance methods
public class Seat
private boolean occupied;
* Constructors:
Seat()
Seat(boolean o)
occupied = o;
* Instance methods:
public boolean isFree()
return !this.occupied;
public boolean isOccupied()
return this.occupied;
public boolean occupy()
if(occupied)
return false;
else
occupied = true;
return true;
public boolean release()
if(!isOccupied())
return false;
else
occupied = false;
return true;
}Your code is working as expected. The server executes System.out.println in showReservations() and this comes out on the server console. The client executes System.out.println() after calling numReservations and this comes out at the client. Any other expectations are misplaced.
-
How can I make a TCP server for muticonnec​tion clients??
Dear group,
I try to change a complicated TCP server with only one client posibility to
a multiclient.
I've seen the examples, even some solution on the ni web, but I don't
understand very well how it's works. I need also logging for each client in
a different file.
Thanks for your help.The best example I have found is this one
Understanding Client-Server Applications -- Example Code
There are a couple of good links to tutorials off the page as well.
If you have questions about the specific example let us know what they are.
Maybe you are looking for
-
Ive been having this problem ever since i upgraded to ios 7. I went to put new music on my iphone, and i synced my phone went to listen to my music and it either has a cloud next to it, a red square, or is there but clear and will not play. Seems tha
-
IPhone no longer syncing with iTunes
I updated my iTunes to 9.2.1 and now, my iPhone can't sync with it. I've tried disconnecting and re-connecting the usb cable (which is connected directly to the computer, a Mac Pro), but it never appears. There was one other change as well. When I fi
-
Powering Up!!!!
-
Lookup.USR_PROCESS_TRIGGERS not working
Whenever a user's OIM attribute is modified, I want that value to be pushed to the user's AD resource. I am not able to get this to work. Here are the steps I took: In the Lookup.USR_PROCESS_TRIGGERS, I added the code key (attribute column name in us
-
Issue in getting Characteristic Values of Contract
Hi Experts, Can anyone let me know, how to get all the Characteristics entries for a line item in a Contract ( i.e. VA43 -> Extras -> Configuration ). I have used VC_I_GET_CONFIGURATION_IBASE, VC_I_GET_CONFIGURATION, and CUCB_GET_SINGLE_INSTANCE, how