Is not possible send the same Message instance several time, only once. So we always have to create a new instance. Better than that, instead of create a new instance (new Message()), we can use the method obtain (Message.obtain()) that will return a recycled instance of Message from the pool of recycled objects, what is … Continue lendo Message.obtain() and new Message() – TIP
Autor: Tássio Auad
Movie Check is coming =D
I'm almost finishing a simple app to submit as capstone projeto for Udacity Nanodegree. I had 1 month to write something acceptable and submit. I worked every weekday night and could face some small challenges. That was a good experience and I'd like to move forward with this project after the nanodegree. ________ Movie Check … Continue lendo Movie Check is coming =D
Service restart behavior – Compilation
START_STICKY Service is restarted if it gets terminated. It will tell the system to create a newest copy of the service, when available memory is sufficient to do, after it retains state and recovers from the low memory. In this process we will loose the results that might have calculated before. onStartCommand() will be called on the … Continue lendo Service restart behavior – Compilation
Hibernate JPA 2.1 – StoredProcedureQuery
Thanks to... someone... that we have JPA 2.1 and the feature StoredProcedureQuery. Throught this method we can call easily a procedure in our database, set parameters and convert the possible result into Java object automatically. Let's imagine a simple procedure called 'SALES_ACCOUNTING' that receives two dates ('INITIALDATE' and 'FINALDATE') that determine the time period and … Continue lendo Hibernate JPA 2.1 – StoredProcedureQuery
Retrofit 2.0 – URL concept
I struggled with the new URL way when I started to use this new version. But it's easy to understand (after miss much because of the old version vices)! Just keep in mind that the base URL and specific URL of a resource are concatenated. So, you must to take care with '/' at the … Continue lendo Retrofit 2.0 – URL concept