Ask questions and see you at July, 2nd, 6.PM. CET: http://www.ustream.tv/channel/adambien
Also checkout recent episode:
Ask questions and see you at July, 2nd, 6.PM. CET: http://www.ustream.tv/channel/adambien
Also checkout recent episode:
Hello Adam,
Let's say that you are using JAX-RS and you return a Person entity that has a relation with a country.
@Entity
class Person {
private Long id;
private String name;
private Country country;
}
@Entity
class Country {
private Long id;
private String name;
}
When i make a GET request on person entity i want to get person's details and only the country ID.
Also on POST requests i want to convert the country ID to the country POJO (country must be received from database).
Thank you.
Hi Adam,
I have three questions for the upcoming airhacks show:
What do you think about the following solution (JavaEE 8, OpenLiberty 18.0.0.2, Flyway 5.0.7)?
@Startup
@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
@Singleton
public class FlywayMigration {
private final Logger log = Logger.getLogger(this.getClass().getName());
@Resource(lookup = "jdbc/sample")
DataSource dataSource;
@PostConstruct
private void onStartup() {
if (dataSource == null) {
log.severe("no datasource found to execute the db migrations!");
throw new RuntimeException(
"no datasource found to execute the db migrations!");
}
Flyway flyway = new Flyway();
flyway.setDataSource(dataSource);
for (MigrationInfo i : flyway.info().all()) {
log.info("migrate task: " + i.getVersion() + " : "
+ i.getDescription() + " from file: " + i.getScript());
}
flyway.migrate();
}
}
And what's your Flyway strategy in enterprise projects for the SQL scripts? Do you create a single SQL script for every change during the Sprint or do you collect all changes during one sprint/cycle and squash them into one single SQL script, so that /db/migration
won't grow that much?
What are the three most important books about Programming/Software Design/Java every developer should read in your opinion?
If you could give your 20-year-old self three lessons for your Developer career, what would it be?
Thank you!
Hi Adam,
I have two questions regarding read-only validation calls in a JEE application with a REST api and JPA as persistence framework.