Advertisement
Guest User

Untitled

a guest
Jul 6th, 2015
266
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. public class SdeTest {
  2. public static void main(String[] args) {
  3. SeConnection connection = null;
  4. try {
  5. System.out.println("Connecting");
  6. connection = new SeConnection("none", "sde:oracle11g:geobase_tns", "none", "{my-user}", "{my-password}@geobase_tns");
  7. System.out.println("CONNECTION OK");
  8. } catch (SeException e) {
  9. e.printStackTrace();
  10. } finally {
  11. if(connection != null) {
  12. try {
  13. connection.freeAllLocks();
  14. connection.close();
  15. } catch (SeException e) {
  16. e.printStackTrace();
  17. }
  18. }
  19. }
  20. }
  21. }
  22.  
  23. geobase_tns =
  24.  
  25. (DESCRIPTION =
  26.  
  27. (ADDRESS_LIST =
  28.  
  29. (ADDRESS = (PROTOCOL = TCP)(HOST = {my-host-ip})(PORT = {my-port-number}))
  30.  
  31. )
  32.  
  33. (CONNECT_DATA =
  34.  
  35. (SERVICE_NAME = {my-service-name})
  36.  
  37. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement