Rodrigo Bossini

Ranch Hand
+ Follow
since Jul 03, 2009
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Rodrigo Bossini

Just in case someone faces the same issue I have updated my app engine to 1.9.7 (along with the Eclipse plugin from within Eclipse) and now the wizard works fine.
4 years ago
At first I put it in the web services forum because I'm actually using google cloud endpoints. Probably the BigTable forum would be a good option indeed.

I can't tell precisely whether or not the A object has been retrieved, but because of the message I'd say it is.

Here is the code I'm using to run the retrieval:

@ApiMethod(name = "getA")
public A getA(@Named("id") String id) {
EntityManager mgr = getEntityManager();
A a = null;
try {
a = mgr.find(A.class, id);
} finally {
return a;

Also, here is my persistence unit configuration:

<persistence-unit name="transactions-optional">
<property name="datanucleus.NontransactionalRead" value="true"/>
<property name="datanucleus.NontransactionalWrite" value="true"/>
<property name="datanucleus.ConnectionURL" value="appengine"/>
<property name="datanucleus.appengine.datastoreEnableXGTransactions" value="true"/>

The datastoreEnableXGTransactions thing has to do with datastore entity groups. It allows one single transaction to operate over entity from up to 5 groups. At the moment I guess I need it because the B objects, children from A, are uowned. But I'm studying some different options too. Any comments on this would be appreciated.

Actually, the topic has to do with datastore and app engine. Although I'm using JPA, this is not an object RELATIONAL mapping issue since datastore is not relational. If the Web Services forum is not appropriate, the ORM forum sounds even worse for me.

I have the following JPA-annotated classes:

The B class has no reference to A.

When I try to get an A object using its ID, I get the following error:

You have just attempted to access field "bs" yet this field was not detached when you detached the object. Either dont access this field, or detach it when detaching the object.

Although I read app engine does not support eager fetching (in a 2012 book), I tried adding fetch = FetchType.EAGER to the annotation and it solved the problem, although then I get the following warning:

"The datastore does not support joins and therefore cannot honor requests to place related objects in the default fetch group. The field will be fetched lazily on first access."

The get operation completes successfully anyway.

So, what's up? What would be the best solution for this case? Keep it with the eager annotation? In my get method I have also accessed the bs collection, which brought the data to memory (the n+1 thing) and everything was ok too.

Any comments would be appreciated.



I'm following the steps from the tutorial below:

The wizard mentioned creates an Android application and a Google App Engine backend to which the Android application would connect. However, the tutorial mentions a class (CloudEndpoints) which is not created for me. Also, my MainActivity class contains this code: Intent intent = new Intent(this, RegisterActivity.class); but the RegisterActivity class does not exist either. Please, what I am doing wrong?

4 years ago
Only now have I noticed how simple my question was. Of course the && is the AND logical operator. What happens is that I have been dealing with bit operator (such as &) and was reading the expression of the IF statement as
(cds && cds) == true instead of cds && (cds == true), as if the && would do some operation between cds and itself before doing the comparison.

5 years ago
Please consider the following code snippet:

char buf[256];
//something here fills in buf correctly
char * cds = strstr(buf,"some string");

if (cds && cds == buf)
//does something

What I don't get in this code is what the && is trying to do there. What is the purpose of && in this example?
5 years ago
Also,I have added a module for the sql server driver and configured it in the standalone.xml file as a datasource. My application can't seem to see it. Do you guys have some suggestions or material I can look at?

5 years ago

My application uses the following code:

private EntityManager em;

Shoule I expect it to work in JBoss 7.1? If so, where do I put the configuration related to the unit called "Institucional"?
5 years ago
Hi, thanks.

I am running version 4.2.2.GA and would like to put my application to run on version 7.1.1.

I have a ds.xml file that in version 4 goes together to the .ear file in the deployment directory.

Here's what it looks like:


Where would I put this information in version 7.1?

Thanks again.
5 years ago

I have a .ear file along with a ds.xml file. This application is running fine at the moment in JBoss version 4. I'm trying to migrate it to version 7. I have had a few issues like it being unable to find some jar files. Now, it gives me a few errors. Before mentioning the errors, I would like to ask? Should I expect the application to run correctly without any changes on the code? I mean, after configuring everything correctly, the application should run no matter its source code? Or maybe I'll have to change something on source code too?

5 years ago

I'm creating a XYLineChart which is built using a XYSeriesCollection which contains two XYSeries. For each x, the y values are too close to each other in these two graphics represented by the XYSeries objects. The difference between them is always under 0.1. The range for the Y values is 0-2000. When I look at the JPG file created, I can barely see the two graphics: one of them is practically hidden by the other. What I'd like is some kind of zoom so the little variations could be seen. I'm not sure whether it would be feasible to alter the scale somehow or maybe changing the JPG dimensions would help. Any suggestions, please?

5 years ago

I have an old asp application running on IIS 6 on windows server 2003 along with an SQL Server 2005 standard database. This application works fine when I test it. HOwever, when I have about 40 users accessing it simultaneously it will give me a "page not found" error.

Is there some configuration in IIS you guys could suggest?
5 years ago

I have an ExecutorService which I'm using to solve a recursive problem. Initially I call submit on this pool passing to it the entire task it has to solve. The task class implements Callable and its method call
makes some calculations and them breaks the problem into two pieces, which I want to solve using other threads on the same pool. So in the task constructor I pass a reference to the same pool so its call method
can call submit on the same pool so the two pieces can be solved by threads on the pool as well. My problem is that I want to call "get" to wait for the results. Obviously, if I have just one thread on the pool, for example,
it will call submit on the pool and then get, but it will wait forever since there are no other threads to run that task it submitted.
So, the bigger my problem is, the more I'll need threads in my pool. I have "solved" the problem by using a CachedThreadPool, which gave me another problem: it creates threads on demand which is not what I want either.
I want a pool with a fixed number of threads. Can you give a suggestion?

How do I find out what languages are available for speech recognition in Android? I mean, not a code snippet, but a website with a current list of supported languages. I'd like to write a simple application that allows me to say: "send" (in portuguese-br) and that understands it as a command and sends a sms message. Is that available out of the box today ?

6 years ago