大家好我是使用JPA與EclipseLink和oracle作爲數據庫,我需要設置屬性v $ session of jdbc4它允許爲應用程序設置標識名稱爲審計目的,但我沒有幸運設置它....我一直試圖通過entitiyManager下面的例子在這個頁面上:http://wiki.eclipse.org/Configuring_a_EclipseLink_JPA_Application_(ELUG)它不顯示任何錯誤,但沒有設置應用程序名稱...當我看到在oracle中進行審計時,它沒有使用我通過代碼「Customers」設置的名稱進行審計,但是使用OS_program_name = JDBC Thin Client時,這意味着代碼中的屬性沒有正確設置,我不知道問題出在哪裏,我正在使用的代碼如下:需要使用JPA設置應用程序名稱的幫助(EclipseLink)
emProperties.put("v$session.program","Customers");
factory=Persistence.createEntityManagerFactory("clients",emProperties);
em=factory.createEntityManager(emProperties);
em.merge(clients);
沒有任何人知道如何做到這一點或任何想法....
thanks.-