This is a bunch of tips and techniques related to Oracle PL/SQL and Forms.
Purpose
Here is a Java bean that allows to transform a Forms module into a socket server.
This way, it can receive messages from the outside.
- In this example, the messages are sent through a telnet session.

In this sample dialog, I have opened a telnet session:
open localhost 4450
Then I can send messages to the Forms application.
- In another way, messages can also be sent by the database:
DECLARE
c utl_tcp.connection; -- TCP/IP connection to the Socket server
ret_val PLS_INTEGER;
BEGIN
c := utl_tcp.open_connection(remote_host => '10.40.40.40',
remote_port => 4450); -- open connection
ret_val := utl_tcp.write_line(c, 'Incoming Message Send by my Oracle DB');
utl_tcp.close_connection(c);
END;
The Java code
SocketServer.java Server.java
The implementation class of the Bean Item
oracle.forms.fd.SocketServer
The methods you can call
Init the socket server
Set_Custom_Property('BLOCK.ITEM', 1, 'INIT_SERVER', 'port_number');
e.g. :
Set_Custom_Property( 'BL.BEAN', 1, 'INIT_SERVER', '4450' ) ;
The event received from the Bean
SENDMSG