normally you can use durable subscriptions without login. Did you set the client ID?
where oConT is an object of type TopicConnection. Without setting it, you get an exception while attempting to subscribe.
To pass login information, you may create the topic connection like this:
TopicConnection oConT = oTopicConnectionFactory.createTopicConnection("username", "pwd");
But I think, first the client Id should be set.
thanks Ingo for your help, putting the user name and password in when i create the topic connection works.