aspose file tools*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Resource Injection Question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Resource Injection Question" Watch "Resource Injection Question" New topic
Author

Resource Injection Question

Khaled Mahmoud
Ranch Hand

Joined: Jul 15, 2006
Posts: 361
Hi all,

I have seen many sample codes on the internet on resource injection. The codes requests a javax.sql.DateSource to an instance field.



The above code, injects a DataSource object How does the target database,
database username, database password are specified. Is this the responsibility of the Application deployer through the deployment tools.

Thanks in advance.


SCJP, SCJD,SCWCD,SCDJWS,SCEA 5 MCP-C#, MCP-ASP.NET - http://www.khaledinho.com/
Life is the biggest school
Fabian Gutierrez
Greenhorn

Joined: Aug 15, 2004
Posts: 22
Khaled,

thats right; in the ejb core spec it reads:

"16.3.3 Deployer�s Responsibility
The Deployer must ensure that the values of all the environment entries declared by an enterprise bean are created and/or set to meaningful values.
The Deployer can modify the values of the environment entries that have been previously set by the Bean Provider and/or Application Assembler, and must set the values of those environment entries for which no value has been specified.

The description elements provided by the Bean Provider or Application Assembler help the Deployer with this task."

regards


SCJP 1.4, SCWCD 1.4, SCBCD 5, SCJD 5
Khaled Mahmoud
Ranch Hand

Joined: Jul 15, 2006
Posts: 361
Hi,
I am now using Glassfish application server with Netbeans Beta 6.0. Can somebody please tell me how configure the DataSource resources in Glassfish.

Thanks in advace
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2516
    
  10

GlassFish Community: JDBC Resources

DZone: Configuring a (Oracle) datasource on Glassfish

Regards, Jan


OCUP UML fundamental and ITIL foundation
youtube channel
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Resource Injection Question