Does anyone have a working example of mysql-ds.xml file and could explain what's the right procedure to define own datasource?
My mysql-ds.xml looks following:
<datasource jndi-name="java:jboss/datasources/MySqlDB" pool-name="MySQLPool">
My composite reference has SQL binding which refers to data source: "java:jboss/datasources/MySqlDB".
My application is packages as war file and mysql-ds.xml is located in WEB-INF directory.
But deployment fails with the error:
"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.data-source.java:jboss/datasources/MySqlDB is missing [jboss.jdbc-driver.mysql-connector-java-5_1_34-bin_jar]"]
Any ideas what's wrong?
Ok, above problem was solved by changing <driver> to "mysql"...
From my point of view, JPA requires you to have JPA entities and persistence unit, but if you have that it is much simpler to use than the current SQL Binding. It is true that in SwitchYard 2, the camel-sql component will be based on camel 2.14 and use will be simplified, as it used to be a hell (required you to use an Iterator to get the values).
So the answer, in my opinion, depends on how are you going to manage your data objects in your application. For simple use cases, the SQL component might be simpler, for complex use cases, you'll end up having your entity objects as JPA entities, so it wil be much easier to use the JPA component.
This is just MY opinion.