Why shouldn't I use a chunk in a tasklet? - spring-batch

The Spring Batch documentation says:
no <chunk/> element should be used within the <tasklet/>
There is no further explanation and I can't imagine any. Can anybody please explain this limitation to me?

I think you have missed something.
This piece of document is saying that, no <chunk/> element should be used within the <tasklet/> IF you are configuring for a Tasklet step.
If you look around a bit, you will see, in order to configure a chunk-oriented step, you are in fact using <chunk/> within a <tasklet/>

Related

Talend: How to get instance of a component in tjava

I want ask if there is way to get an instance of a component if a job (ex:tmap, tmysqlinput) in tjava code and then manipulate it manually using code?
Thank you
Very hazardous. Looking at the generated Java code will give you some answers (I think so).
In fact, accessing to some objects properties is possible (there is blogs and articles about this) but changing anything seems to be dangerous (IMHO).
TRF

System.err.println shows no output

I am using STS 3.4 and working on a web application based on Grails framework.
When i try to use System.err.println in groovy classes it does not print anything on standard eclipse console(STS console).
Actually there are times when in print things but that is like 1 in 10, I couldn't understand this random behavior.
I am using some library that uses System.err.println for debugging purposes but i could not get any debugging info. All i need to know is where and how to get System.err.println output?
Please help me, Thanks in advance
If it is a random behaviour, it may be not-flush-ed buffered stream. Especially, that can happen when output comes from different thread.
As a solution, you can hook in into System.err dispatching (it's a stream, that you can set from outside), and overload functions, to get desired output anywhere you want. Or simply force flush it. But be careful, as it may lead to performance problems.
Consider using logging instead for more standard and configurable output. This should help you to set it up: http://groovy.codehaus.org/Logging

JBehave - Ignoring failures in examples

I have many scenarios with Examples. In case of failure for an "Example", JBehave stop executing the scenario for remaining list of examples. e.g.
Given a record with classification
When I view the page
Then I see the record has type
Examples:
|classification|type|
|classification_1|type_1|
|classification_2|type_2|
|classification_3|type_3|
|classification_4|type_4|
If the scenario fails for
|classification_2|type_2|
then it will not execute 3 and 4.
Is there a way to configure JBehave to execute all the examples even in cas of failures?
Thanks.
After debugging with JBehave source code, looks like it is not possible. In StoryRunner class, in case of failure it uses instance of "SomethingHappened implements State" which doesn't look at any strategy just does the following:
StepResult result = step.doNotPerform(scenarioFailure);
result.describeTo(reporter.get());
Hence we see step NOT PERFORMED in the report.
I wish I'm wrong and somebody more knowledgeable can correct me.
This seems to be similar to a post I have just answered. Please check your configuration. More information can be found here
JBehave : How to ignore failure in scenario

GWT request .with method

I'm sorry in advance if this rather n00bish question actually has an answer in the documentation which I've just failed to find, but
I'm still relatively new to GWT, and try as I might I can't find an explanation of what the request.with(String...) method actually does which I can understand. Please can someone explain to me in words of one sylable what this method does and why you'd use it?
thanks very much
It indeed is in the doc: https://developers.google.com/web-toolkit/doc/latest/DevGuideRequestFactory#relationships
By default, entity proxies referenced from the entity proxy/ies you're fetching are not fetched (properties will simply be null on the client-side). You have to explicitly ask for them using with(), passing the name (can be a dotted path too) of the properties you want to fetch.

How can I create or associate a super column to a column in Perl using Net::Cassandra?

How can I create or associate a super column to a column in Perl using Net::Cassandra?
I just chatted with the module author and he doesn't understand the question. Then he guessed you want batch_insert which can take a supercolumn.
If that doesn't help, perhaps you step back, try to explain what you want to achieve and rephrase the question.
Best way, IMHO, is to submit a request to add information about super columns into documentation into Net::Cassandra bug tracker.
batch_insert is one way like daxim says; another way is to just use normal insert but specify super_column in the ColumnPath as well as the column_family.
It looks like Net::Cassandra stays pretty close to the thrift api, so this should be useful: http://wiki.apache.org/cassandra/API