I have a requirement where I need to grab the Insert and Update Native SQL statement being fired and store it in a log table in the DB. Is it possible for me to get the query in eclipselink?
Register your own custom logger that logs to your database rather than to the file system and configure eclipselink.logging.level.sql=FINE in the persistence unit. Then you can piggy-back on the existing solution for logging SQL statements and save them to the log table. See http://wiki.eclipse.org/EclipseLink/Examples/JPA/CustomLogger and https://wiki.eclipse.org/EclipseLink/Examples/JPA/Logging for details.