Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
056ba128
Commit
056ba128
authored
Nov 19, 1998
by
Marc G. Fournier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parent
fd0366e1
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
162 additions
and
79 deletions
+162
-79
src/corba/pgsql.idl
src/corba/pgsql.idl
+96
-79
src/corba/pgsql_int.idl
src/corba/pgsql_int.idl
+7
-0
src/corba/server.cc
src/corba/server.cc
+59
-0
No files found.
src/corba/pgsql.idl
View file @
056ba128
...
...
@@ -9,6 +9,8 @@
#
include
"CosQueryCollection.idl"
#
endif
#
pragma
prefix
""
module
PostgreSQL
{
//
Built
-
in
types
...
...
@@ -26,7 +28,7 @@ module PostgreSQL {
typedef
boolean
Null
;
union
Value
switch
(
Null
)
{
case
false
:
any
value
;
case
FALSE
:
any
value
;
}
;
...
...
@@ -61,11 +63,26 @@ module PostgreSQL {
//
I
'm not sure yet about LOCK and UNLOCK.
// </info>
// Expirable object
interface Expirable {
/* oneway? */ void keepalive();
void remove();
};
// Upcall object
interface Upcall {
void notice(in string message);
void abort();
};
// Connected database object
interface Database : CosQuery::QueryableCollection
{
void
disconnect();
interface Database : CosQuery::QueryableCollection
, Expirable {
void
setupcall(in Upcall obj);
};
...
...
src/corba/pgsql_int.idl
0 → 100644
View file @
056ba128
//
Internal
interfaces
#
include
"pgsql.idl"
module
PostgreSQL
{
interface
QueryResult
:
CosQueryCollection
::
Collection
,
Expirable
{}
;
}
;
src/corba/server.cc
0 → 100644
View file @
056ba128
#include <iostream>
#include "pgsql_int.h"
bool
terminate
=
false
;
int
main
(
int
argc
,
char
*
argv
)
{
CORBA
::
ORB_var
orb
=
CORBA
::
ORB_init
(
argc
,
argv
,
""
);
PortableManager
::
POA_var
poa
=
PortableServer
::
POA
::
_narrow
(
orb
->
resolve_initial_references
(
"RootPOA"
));
PortableManager
::
POAManager_var
mgr
=
poa
->
the_POAManager
();
Server_impl
*
server
=
new
Server_impl
;
poa
->
activate_object
(
server
);
CosNaming
::
NamingContext_var
ctx
=
CosNaming
::
NamingContext
::
_narrow
(
orb
->
resolve_initial_references
(
"NamingService"
));
CosNaming
::
Name_var
n
=
new
CosNaming
::
Name
(
1
);
n
[
0
].
id
(
"PostgreSQL"
);
n
[
0
].
name
(
"service"
);
bool
bindok
=
false
;
if
(
!
CORBA
::
Object
::
is_nil
(
ctx
))
{
try
{
CosNaming
::
NamingContext_var
myctx
=
ctx
->
bind_new_context
(
n
);
CosNaming
::
Name_var
n2
=
new
CosNaming
::
Name
(
1
);
n2
[
0
].
id
(
"Server"
);
n2
[
0
].
name
(
"Server"
);
myctx
->
bind
(
n2
,
server
->
_this
());
bindok
=
true
;
}
catch
(
CORBA
::
Exception
&
e
)
{
cerr
<<
"Warning: Naming Service bind failed"
<<
endl
;
bindok
=
false
;
}
}
else
{
cerr
<<
"Warning: Naming Service not found"
<<
endl
;
}
mgr
->
activate
();
while
(
!
terminate
)
{
if
(
orb
->
work_pending
())
orb
->
perform_work
();
if
(
expiry_needed
())
expire_now
();
}
if
(
!
CORBA
::
Object
::
is_nil
(
ctx
)
&&
bindok
)
{
try
{
CosNaming
::
NamingContext
myctx
=
ctx
->
resolve
(
n
);
ctx
->
unbind
(
n
);
myctx
->
destroy
();
}
catch
(
CORBA
::
Exception
&
e
)
{
cerr
<<
"Warning: Naming Service unbind failed"
<<
endl
;
}
}
orb
->
shutdown
(
true
);
delete
server
;
return
0
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment