On Thu, Jan 3, 2013 at 9:08 AM, Simon Renard <simon.ren...@3ds.com> wrote:
> I've deployed a web application that uses a local derby database that does > not have any authentication necessary. > > Am I missing something or is it a bug in 1.5.1 ? I've also tried to set > UserName to '' or "" but it results in '' and "" being the actual UserName. > Is their a bypass ? > That's interesting. I have been using Apache Derby ever since I started development of my JSF web app (1.5 years ago), and maybe it was Netbeans that asked me for a username and password, so I 'assumed' it was necessary and best to provide a username and password, so I provided username and password ever since the database was created. So, with that said, the following is in my tomee.xml, and this works in 1.5.1 and 1.5.2 SNAPSHOT. <Resource id="jdbc/mcmsJta" type="javax.sql.DataSource"> JdbcDriver org.apache.derby.jdbc.EmbeddedDriver JdbcUrl jdbc:derby:C:/javadb/databases/mcmsdev;create=true UserName myUserName Password myPassword JtaManaged true jmxEnabled true LogSql false InitialSize 10 MaxActive 100 MaxIdle 30 MaxWait 10000 jdbcInterceptors=StatementCache(max=128) removeAbandoned true removeAbandonedTimeout 18000 </Resource> <Resource id="jdbc/mcmsNonJta" type="javax.sql.DataSource"> JdbcDriver org.apache.derby.jdbc.EmbeddedDriver JdbcUrl jdbc:derby:C:/javadb/databases/mcmsdev;create=true UserName myUserName Password myPassword JtaManaged false jmxEnabled false LogSql false InitialSize 10 MaxActive 100 MaxIdle 30 MaxWait 10000 removeAbandoned true removeAbandonedTimeout 18000 </Resource>