Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UDP ports not being closed #78

Open
goyocasero opened this issue Dec 12, 2018 · 1 comment
Open

UDP ports not being closed #78

goyocasero opened this issue Dec 12, 2018 · 1 comment

Comments

@goyocasero
Copy link

Hi.
We're using com4j in our Java 8 application to connect to our Microsoft Active Directory, using the following code:
` _Connection con = com4j.typelibs.ado20.ClassFactory.createConnection();
try {
con.provider("ADsDSOObject");
con.open("AD-Anon-Search", "", "", -1/default/);

    	_Command cmd = com4j.typelibs.ado20.ClassFactory.createCommand();
    	try
    	{
	    	cmd.activeConnection(con);
	    	cmd.commandText("<GC://" + this.domain + ">;" + filter.encode() + ";" + atributes + ";SubTree");
	    	_Recordset rs = cmd.execute(Variant.getMissing(), Variant.getMissing(), -1/*default*/);
	    	try
	    	{
	    		if (rs.eof())
	    			return nullValue;
	    		else
	    			return mapper.mapRecordSet(rs);
	    	} finally {
	    		rs.close();
	    		rs.dispose();
	    	}
    	} finally {
    		cmd.dispose();
    	}
	} finally {
		con.close();
		con.dispose();
		COM4J.cleanUp();
	}`

We're noticing that everytime the command executes it opens an UDP connection against our AD, but this connection is never closed. So, after some time, we got all ours UDP ports opened.
AFAIK, we're closing everythin up. aren't we? Is there anything else we should do?

@kllbzz
Copy link
Contributor

kllbzz commented Dec 12, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants