tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Howard W. Smith, Jr." <smithh032...@gmail.com>
Subject Re: tomee+ 1.5.1 : datasource creation failed with an empty UserName
Date Thu, 03 Jan 2013 14:18:32 GMT
On Thu, Jan 3, 2013 at 9:08 AM, Simon Renard <simon.renard@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>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message