Manuel Palacio

Ranch Hand
+ Follow
since Oct 16, 2000
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Manuel Palacio

You have to use itemValue like:

for the button that should be selected by default. The other one should be false then.
13 years ago
JSF
You can download this one for free if you sign up for an account.
13 years ago
Tomahawk components have issues with portals. According to my experience with JBoss Portal, some components work but you'll most likely find issues. There are also problems when you try to integrate facelets with tomahawk components.

All the component libraries have issues with portals: Ajax4JSF, Trinidad, Tomahawk and IceFaces. Icefaces is currently becoming portal-compliant (goal is Q1 2007).

The promise of reusable JSF UI components is broken with portals.
13 years ago
I haven't tried this but couldn't you just read() the file channel into a ByteBuffer and then create a ByteArrayInputStream from the byte [] backing it?

Then you pass the stream to DocumentBuilder.
[ September 05, 2006: Message edited by: Manuel Palacio ]


If you are a good OO engineer, you should be hopping mad right about now! Oh sure, violating encapsulation in unit test code is mighty uncomfortable, but violating encapsulation in production code JUST AIN'T DONE!



Generally speaking, unit tests are first-class users of the runtime code and deserve the same consideration as any other user. If your code is too inflexible for the tests to use, then you should correct the code.

But of course, in this case it'd be much much better to use IoC patterns (i.e. inject a mock or the real thing) to make the class easier to test as someone pointed out previously in the thread.
14 years ago
I usually base-64 encode it, store in the DB and then decode with:

14 years ago
You should check the classes in the java.util.concurrent package like:

FutureTask

These classes should meet most of your "multithreaded" needs.

For example you could get rid of the timer and just use Future like this:



get() will return when the task is done, so you don't have to wait for 10 s even if it's done. You could also ask the task if it's done after 5s, if not cancel it, etc.
[ August 30, 2006: Message edited by: Manuel Palacio ]
14 years ago
Axis comes with a WSDL to Java tool that you can use to generate code to access the WS programmatically. You can use the generated interfaces in Spring.
If you are using non-blocking sockets, you can't rely on available() anymore. You have to call the read method in the SocketChannel with a byte buffer and check that you have read enough data: "read() cannot read any more bytes than are immediately available from the socket's input buffer".

As usual I'd recommend using a framework. And for writing high-performance network apps I'd suggest: http://directory.apache.org/subprojects/mina/getting_started.html

I've used it succesfully in a project that required non-blocking sockets.

/M
14 years ago
You have to override the toString() method in Dog and print the dog name there.

Otherwise it returns (default impl)
[ April 25, 2006: Message edited by: Manuel Palacio ]
14 years ago
I wouldn't spend much time with EJB. Focus rather on the Spring Framework's approach to building applications based on the framework. It's more fun and you'll also learn a lot about testing and design patterns.
14 years ago
Check that you have a no-argument constructor with at least package visibility.