Hi, there !
Thanks for reply and hints ...
> Nope, but it should work. Are you using multiple DS's *per bean* or do
> you just have a generic BMP base entity which you extend to multiple
> BMP's with different DS's?
I think I should be more clear: I need to implement a generic bean which reads
the metadata of a specified database/table and initialize the internal
variables - stores the database structure and schema - (the definition of the
bean content so to say). I use the same class for different tables with
different DS.
> Why don't you use environment variables? You know you're not allowed to
> read files in EJB's...
I've tried to use the env-entry tags to set the env for the bean, but it seems
that the env-entries are available at the running time when the bean was
already created and not by creation time .... ?? Am I wrong ?? The bean
receive the entity context as initial context from the container but without
those information that are specified in the deployment descriptor (env-entry
info).
> It seems like the easiest way to do this is to have a resource reference
> "java:comp/env/jdbc/BeanDS" that you configure on jboss.xml for each
> bean to point to the respective database. Use environment entries for
> table names etc.
Yes, but if i use the same bean class then the pool name could not be hard
coded. The funny thing is that by the creation time I could probably receive
more arguments, but in the findByPrimaryKey only one. Not to mention, I use
also two PKs, one for internal needs which represents the bean in the
container and the second which identify the associated row in the database -
since the database could have a different PK type as I have internally. This
is also something that I didn't understood: Why when I have a multiple PK
these information must be in both classes defined (PK class and the Bean that
use that PK class) ??
> regards,
> Rickard
What do you suggest to do now ??
Best regards,
Adrian.
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]