Posts by Fernando Nogueira • 147 points
5 posts
-
2
votes2
answers215
viewsA: How to map class fields with names other than database columns?
You can use the annotation @Column(name = "url_foto") above the field urlFoto. We use this annotation when the column name in the database is different from the class field name.…
-
1
votes1
answer597
viewsA: How to consume a message from a remote MQ queue using MDB on Jboss servers
Follows the resolution of the problem in question. Heed: this solution does not take into account important factors for a project in production, such as security, better architecture, balancing,…
-
3
votes1
answer597
viewsQ: How to consume a message from a remote MQ queue using MDB on Jboss servers
I have an EJB class that writes a message in a JMS queue and would like to consume this message from a Messagedrivenbean (MDB) installed on another server. My class successfully writes in the JMS…
-
3
votes1
answer70
viewsA: Column not found when performing SUM
Change your query to: select sum(quantidade_dias) as quantidade_dias from ferias_alunos WHERE rf =? AND exercicio ? The code rs.getInt("quantidade_dias") search for a result whose column name is…
-
1
votes1
answer112
viewsA: Problems to close communication with the database
I suggest you change the code to use the Try-with-Resources block. Declare your resources (ResultSet, PreparedStatement and Connection) in this way, as they all currently implement the interface…