One to One Mappings in Hibernate

Simple One to One using assigned identifiers (meaning you hae to set the id yourself) http://www.xylax.net/hibernate/onetoone.html

Using Formula’s in hibernate mappings and some other neat tricks round computed fields http://www.onjava.com/lpt/a/6092

Hibernates Own Reference Documentation
http://www.hibernate.org/hib_docs/v3/reference/en/html_single/#mapping-declaration-onetoone

… Chapter 7 on associations gives some examples.  http://www.hibernate.org/hib_docs/reference/en/html/associations.html

Quick guide to router config

>enable (en)  go from user to privelaged mode

#configure terminal (conf t)  Enter configuration mode

(config)# hostname YourCustomName Put a hostname on the router

(config)# enable secret pass Enable a password on the router when entering privelage mode.  Stored in MD5

(config)# enable password pass Seldom used password enablement as above but stored in plain text.

(config)# line vty 0 4   Configure 5 virtual telephony ports (telnet) ports
(config-line)# password cisco
(config-line)# login 
Set password for telnet.  Forgetting the login command following the password will not make the command go through

(config)#line con 0   Enter the console config
(config-line)# password cisco   Set the password for the console
(config-line)# login 

#show run Show running config  (Show running-config)
#copy run start  Copy ram config to NVram
#show start  Show start
>show flash  Show config in flash

(config)# inteface fastethernet 0/0 or int fa0/0  Enter interface config mode
(config-if)# ip address 192.168.10.1 255.255.255.0  Set the ip and subnet for that address
(config-if)# no shutdown  Bring the interface up (shutdown would take it down)
(config-if)# description Your friendly description of the router

#show protocols  Show the state of the router interfaces
#show ip interface brief  Checks the state of the router interfaces

When using the show commands, use space to page down, enter to line down and any other key to exit the more prompt

#erase start  Erase nvram; Refresh the router to the default state
#reload    Restart the router, using config from new state

Trace Route

Send pings to successive routers, along the path to the destination.

 Sends 3 packets to each destination

Netstat flags

-a -e -n -s (statistics) -rn (routing table)

H:>netstat -rn

Route Table
===========================================================================
Interface List
0x1 ……………………… MS TCP Loopback interface
0x2 …00 13 72 7e e0 8d …… Broadcom NetXtreme Gigabit Ethernet #3 – Eacfilt
0x3 …44 45 53 54 42 00 …… Nortel IPSECSHM Adapter – Eacfilt Miniport
===========================================================================
===========================================================================
Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
0.0.0.0          0.0.0.0  131.170.112.254  131.170.112.73       20
127.0.0.0        255.0.0.0        127.0.0.1       127.0.0.1       1
131.170.112.0    255.255.255.0   131.170.112.73  131.170.112.73       20
131.170.112.73  255.255.255.255        127.0.0.1       127.0.0.1       20
131.170.255.255  255.255.255.255   131.170.112.73  131.170.112.73       20
224.0.0.0        240.0.0.0   131.170.112.73  131.170.112.73       20
255.255.255.255  255.255.255.255   131.170.112.73               3       1
255.255.255.255  255.255.255.255   131.170.112.73  131.170.112.73       1
Default Gateway:   131.170.112.254
===========================================================================
Persistent Routes:
None

H:>netstat -a

Active Connections

Proto  Local Address          Foreign Address        State
TCP    b05108003-14:82        b05108003-14.set.rmit.edu.au:0  LISTENING
TCP    b05108003-14:epmap     b05108003-14.set.rmit.edu.au:0  LISTENING
TCP    b05108003-14:microsoft-ds  b05108003-14.set.rmit.edu.au:0  LISTENING
TCP    b05108003-14:1761      b05108003-14.set.rmit.edu.au:0  LISTENING
TCP    b05108003-14:2030      b05108003-14.set.rmit.edu.au:0  LISTENING
TCP    b05108003-14:1033      b05108003-14.set.rmit.edu.au:0  LISTENING
TCP    b05108003-14:netbios-ssn  b05108003-14.set.rmit.edu.au:0  LISTENING
TCP    b05108003-14:427       b05108003-14.set.rmit.edu.au:0  LISTENING
TCP    b05108003-14:1029      SET-GN-WITTIG.set.rmit.edu.au:524  ESTABLISHED
TCP    b05108003-14:1031      SET-GN-WITTIG.set.rmit.edu.au:524  ESTABLISHED
TCP    b05108003-14:1098      SET-GN-HERTZ.set.rmit.edu.au:524  ESTABLISHED
TCP    b05108003-14:1103      SET-GN-HERTZ.set.rmit.edu.au:524  ESTABLISHED
TCP    b05108003-14:1107      set-gn-marconi-usrc2.set.rmit.edu.au:524  ESTABL
TCP    b05108003-14:1108      set-gn-marconi-sharec1.set.rmit.edu.au:524  ESTA
TCP    b05108003-14:1123      SET-WN-PROXY14.set.rmit.edu.au:524  ESTABLISHED
TCP    b05108003-14:1233      wasted.pacific.net.au:ftp  CLOSE_WAIT
TCP    b05108003-14:3017      b05108003-14.set.rmit.edu.au:0  LISTENING
UDP    b05108003-14:82        *:*
UDP    b05108003-14:83        *:*
UDP    b05108003-14:snmp      *:*
UDP    b05108003-14:microsoft-ds  *:*
UDP    b05108003-14:1026      *:*
UDP    b05108003-14:1027      *:*
UDP    b05108003-14:1034      *:*
UDP    b05108003-14:ms-sql-m  *:*
UDP    b05108003-14:1761      *:*
UDP    b05108003-14:3024      *:*
UDP    b05108003-14:ntp       *:*
UDP    b05108003-14:1134      *:*
UDP    b05108003-14:1240      *:*
UDP    b05108003-14:ntp       *:*
UDP    b05108003-14:netbios-ns  *:*
UDP    b05108003-14:netbios-dgm  *:*
UDP    b05108003-14:427       *:*
UDP    b05108003-14:1025      *:*

H:>netstat -e
Interface Statistics

Received            Sent

Bytes                     142159154        84633058
Unicast packets              185498          148531
Non-unicast packets           11683              71
Discards                          0               0
Errors                            0               0
Unknown protocols             12946

H:>netstat -s

IPv4 Statistics

Packets Received                   = 188221
Received Header Errors             = 0
Received Address Errors            = 8
Datagrams Forwarded                = 0
Unknown Protocols Received         = 0
Received Packets Discarded         = 47
Received Packets Delivered         = 188166
Output Requests                    = 148664
Routing Discards                   = 0
Discarded Output Packets           = 0
Output Packet No Route             = 0
Reassembly Required                = 0
Reassembly Successful              = 0
Reassembly Failures                = 0
Datagrams Successfully Fragmented  = 0
Datagrams Failing Fragmentation    = 0
Fragments Created                  = 0

ICMPv4 Statistics

Received    Sent
Messages                  46          97
Errors                    0           0
Destination Unreachable   0           10
Time Exceeded             0           0
Parameter Problems        0           0
Source Quenches           0           0
Redirects                 0           0
Echos                     8           79
Echo Replies              34          8
Timestamps                0           0
Timestamp Replies         0           0
Address Masks             0           0
Address Mask Replies      0           0

TCP Statistics for IPv4

Active Opens                        = 220
Passive Opens                       = 0
Failed Connection Attempts          = 0
Reset Connections                   = 51
Current Connections                 = 10
Segments Received                   = 177836
Segments Sent                       = 138744
Segments Retransmitted              = 2

UDP Statistics for IPv4

Datagrams Received    = 10125
No Ports              = 321
Receive Errors        = 31
Datagrams Sent        = 9820

H:>netstat -n

Active Connections

Proto  Local Address          Foreign Address        State
TCP    131.170.112.73:1029    131.170.136.3:524      ESTABLISHED
TCP    131.170.112.73:1031    131.170.136.3:524      ESTABLISHED
TCP    131.170.112.73:1098    131.170.136.5:524      ESTABLISHED
TCP    131.170.112.73:1103    131.170.136.5:524      ESTABLISHED
TCP    131.170.112.73:1107    131.170.136.32:524     ESTABLISHED
TCP    131.170.112.73:1108    131.170.136.33:524     ESTABLISHED
TCP    131.170.112.73:1123    131.170.136.6:524      ESTABLISHED
TCP    131.170.112.73:1233    61.8.0.55:21           CLOSE_WAIT

Display DNS

Havent come across this one before.

 H:>ipconfig /displaydns

Windows IP Configuration

         ns1.cisco.com
         —————————————-
         Record Name . . . . . : ns1.cisco.com
         Record Type . . . . . : 1
         Time To Live  . . . . : 23138
         Data Length . . . . . : 4
         Section . . . . . . . : Answer
         A (Host) Record . . . : 128.107.241.185
         1.0.0.127.in-addr.arpa
         —————————————-
         Record Name . . . . . : 1.0.0.127.in-addr.arpa.
         Record Type . . . . . : 12
         Time To Live  . . . . : 594069
         Data Length . . . . . : 4
         Section . . . . . . . : Answer
         PTR Record  . . . . . : localhost
         ibm.com
         —————————————-
         Record Name . . . . . : ibm.com
         Record Type . . . . . : 1
         Time To Live  . . . . : 8473
         Data Length . . . . . : 4
         Section . . . . . . . : Answer
         A (Host) Record . . . : 129.42.17.103
         Record Name . . . . . : ibm.com
         Record Type . . . . . : 1
         Time To Live  . . . . : 8473
         Data Length . . . . . : 4
         Section . . . . . . . : Answer
         A (Host) Record . . . : 129.42.18.103
         Record Name . . . . . : ibm.com
         Record Type . . . . . : 1
         Time To Live  . . . . : 8473
         Data Length . . . . . : 4
         Section . . . . . . . : Answer
         A (Host) Record . . . : 129.42.16.103
         Record Name . . . . . : ns.austin.ibm.com
         Record Type . . . . . : 1
         Time To Live  . . . . : 8473
         Data Length . . . . . : 4
         Section . . . . . . . : Additional
         A (Host) Record . . . : 192.35.232.34
         Record Name . . . . . : ns.watson.ibm.com
         Record Type . . . . . : 1
         Time To Live  . . . . : 8473
         Data Length . . . . . : 4
         Section . . . . . . . : Additional
         A (Host) Record . . . : 129.34.20.80
         Record Name . . . . . : ns.almaden.ibm.com
         Record Type . . . . . : 1
         Time To Live  . . . . : 8473
         Data Length . . . . . : 4
         Section . . . . . . . : Additional
         A (Host) Record . . . : 198.4.83.35
         Record Name . . . . . : internet-server.zurich.ibm.com
         Record Type . . . . . : 1
         Time To Live  . . . . : 8473
         Data Length . . . . . : 4
         Section . . . . . . . : Additional
         A (Host) Record . . . : 195.176.20.204
         ns.watson.ibm.com
         —————————————-
         Record Name . . . . . : ns.watson.ibm.com
         Record Type . . . . . : 1
         Time To Live  . . . . : 8473
         Data Length . . . . . : 4
         Section . . . . . . . : Answer
         A (Host) Record . . . : 129.34.20.80
         ns.austin.ibm.com
         —————————————-
         Record Name . . . . . : ns.austin.ibm.com
         Record Type . . . . . : 1
         Time To Live  . . . . : 8473
         Data Length . . . . . : 4
         Section . . . . . . . : Answer
         A (Host) Record . . . : 192.35.232.34
         cisco.com
         —————————————-
         Record Name . . . . . : cisco.com
         Record Type . . . . . : 1
         Time To Live  . . . . : 23138
         Data Length . . . . . : 4
         Section . . . . . . . : Answer
         A (Host) Record . . . : 198.133.219.25
         Record Name . . . . . : ns1.cisco.com
         Record Type . . . . . : 1
         Time To Live  . . . . : 23138
         Data Length . . . . . : 4
         Section . . . . . . . : Additional
         A (Host) Record . . . : 128.107.241.185
         Record Name . . . . . : ns2.cisco.com
         Record Type . . . . . : 1
         Time To Live  . . . . : 23138
         Data Length . . . . . : 4
         Section . . . . . . . : Additional
         A (Host) Record . . . : 64.102.255.44
         ns2.cisco.com
         —————————————-
         Record Name . . . . . : ns2.cisco.com
         Record Type . . . . . : 1
         Time To Live  . . . . : 23138
         Data Length . . . . . : 4
         Section . . . . . . . : Answer
         A (Host) Record . . . : 64.102.255.44
         ns.almaden.ibm.com
         —————————————-
         Record Name . . . . . : ns.almaden.ibm.com
         Record Type . . . . . : 1
         Time To Live  . . . . : 8473
         Data Length . . . . . : 4
         Section . . . . . . . : Answer
         A (Host) Record . . . : 198.4.83.35
         localhost
         —————————————-
         Record Name . . . . . : localhost
         Record Type . . . . . : 1
         Time To Live  . . . . : 594069
         Data Length . . . . . : 4
         Section . . . . . . . : Answer
         A (Host) Record . . . : 127.0.0.1
         internet-server.zurich.ibm.com
         —————————————-
         Record Name . . . . . : internet-server.zurich.ibm.com
         Record Type . . . . . : 1
         Time To Live  . . . . : 8473
         Data Length . . . . . : 4
         Section . . . . . . . : Answer
         A (Host) Record . . . : 195.176.20.204