Top.Mail.Ru
July 21st, 2006 - Java developers — LiveJournal
? ?

Java developers

July 21st, 2006
Image

09:38 am - Imagegrauwulf - What do you think? ISO Tomcat guru.

Okay maybe not a 'guru'

I'm playing around with something on the side, the short version is that it needs to listen to a specific port and package a bytestream to a standard soap envolope (close enough anyway) which will be stuffed into a messege queue. Of course there is a catch, it has to run in tomcat and be easily intalled and managed by non geeks. The other minor cavete is that the messeging is being handled by MSSQLSERVER and there are currently no pools set up.

Option 1) bring in Axis and set it up as a web service that will handle all of the collection + transformation and then dump in on a JMS stack?

Option 2) write a seperate service(service/engine/connector/host/context) into tomcat that will run in paralel with Catalina and write a root level filter that will handle the collection, pass tranformation to a secondary library, then stuff the messege into the local datasource.

Option 3) custom write an olde skoole rmi server to monitor the desired port and then shovel things along behind the scenes

Obviously I lean towards op1, but with the vast majority of my webservice experience being in WebLogic, I'm not sure of the performance hits.

So what are your oppinions? I'm open to other ideas aswell.
-Thanks
-Mel
Image

12:45 pm - Imagethreeeyedfish - Need help.

Hello!
I have to make an URLConnection to a page using POST with some additional DATA.
How can I add required headers to the request?
 

09:41 pm - Imagecurious_tiger - splicing an array

This should be an easy question, but I can't seem to find the answer in the Java Class Library page on arrays.

All I want to do is write a simple line of code which will return a new array from index x to index y of the old array. Writing this manually isn't hard, or especially tedious, I'll just do it here to prove I know how:
int x = 4;
int y = 6;
int counter = 0;
int [] firstArray = {1,2,3,4,5,6,7,8,9,10};
int [] secondArray = new int[10];

for (int i=x; i<=y; i++)
 secondArray[counter++] = firstArray[i];

That's great. But I can't help but wonder if I'm missing something really obvious, like:
  int[] secondArray = Array.splice(firstArray,4,7);   // which would be like substring for arrays

Is such a method hidden somewhere that's not on the Java Class Library array page, or am I right to assume that it doesn't exist?
Powered by LiveJournal.com
Image