How to use jndi datasource on Weblogic instead of adding a DB data source
Hi All,
version: 11.1.1.4
I am trying to figure out how in my ADF applications I can use an existing jndi datasource out on our weblogic servers instead of having to bury the Database db source in my adf applications. Like SOA I would like to reference the DB directly during design so I can pull in entities and build view objects, but when I deploy I want it to reference the jndi datasource out on the weblogic server.
Is this possible? If so I am not sure how to configure it like I would a DB adapter in SOA.
As always appreciate the info.
Thanks,
S
If you use ADF in the model layer (application modules) you can configure them to use JNDI Datasources. Just right click on the application module and select 'Configurations...'. In the next dialog you see all the configurations currently available (one named xxxxxlocal and one named xxxxxshared at least). Select the local and hit the edit button. This open the DB connect dialog where you can change the connection from JDBC URL to JDBC Datasource (JNDI). Save your work and when you now start the app it will use the JNDI name.
Timo
Similar Messages
-
How to use JNDI datasource instead of database connection settings JDev 10g
Hi,
In order to use the different database from other environments, we are not able to use the JNDI datasource configuration settings, all the time need to configure the database connection settings from JDeveloper by changing the database connectivity settings in the JDeveloper for each environment separately, need a solution on how to make the database connectivity unique using the JNDI datasource name for all the environments for database connectivity settings through the application server console rather than changing the database adapter configuration in JDeveloper.
Please provide the update at the earliest. Your help is greatly appreciated. Thanks in advance..What are you not clear on?
What you need to do is get your developers to conform to a database naming standard, as stated above, so if you have an oracle database that is for eBusiness Suite you get all developers to create a DB connection in JDev called, ora_esb as an example.
When the developer creates a DB adapter this will create a JNDI name of eis/DB/ora_ebs. When the BPEL project is deployed it looks for the JNDI name in the oc4j-ra.xml file to see its connection details. If they don't exist then they use the developers connection details. The issue with this is that they generally always point to the development DB. It is best practice for the developers to remove the mcf settings in the DB adapter WSDL. This way if the JNDI name has not been configured it will fail.
So when you migrate from dev-test-prod what you have is the JNDI name eis/DB/ora_ebs. The dev points to the dev instance of ebs, test points to the test instance and so on. This means that you don't need to adjust any code in the BPEL projects.
cheers
James -
How can I configure ang use JNDI datasource on Tomcat 4.0.x ?
How can I configure ang use JNDI datasource on Tomcat 4.0.x ?
Please help me , Thanks !Hello ,
You need to go through the JNDI tutorial which you can access at the sun's site. It will explain all the things you need.
By the way all you want to use JNDI datasource is JNDI class library and some naming or directory service provider, which also you can download from sun.
Good Luck. -
How to use Domino LDAP in WebLogic Portal 8.1?
Hi, all
I'm trying to solve the problem of how to use Domino LDAP in WebLogic Portal 8.1. Anybody who have this experience please help me.
Best Regards,
SeanHi,
I just spoke to BEA and domino LDAP not supported although they gave me these
LDAP filters that might help -
http://support.bea.com/application?namespace=askbea&origin=ask_bea_answer.jsp&event=link.view_answer_page_solution&answerpage=solution&page=wls/S-09460.htm
Sean Lin <[email protected]> wrote:
Hi, all
I'm trying to solve the problem of how to use Domino LDAP in WebLogic
Portal 8.1. Anybody who have this experience please help me.
Best Regards,
Sean -
using sharepoint designer 2013 - connected to sharepoint online - but getting " data source file cannot be saved" after making a new linked datasource
Hi,
Based on your description, I have done a test and I can’t reproduce your issue.
I have used SharePoint Designer 2013 to open a SharePoint Online site and there are no issues.
I’d like to clarify whether you encounter any issues when accessing SharePoint Online sites. If there are no issues during the accessing procedure, SharePoint Online service should be working fine at your side. The issue may be caused by specific SharePoint
Designer client or network. I suggest you refer to the following steps to troubleshoot the issue.
1. Use SharePoint Designer to open another site and check whether it is successful.
2. When you are prompted to enter Office 365 account and password, try other users’ accounts and select the remembering the credential.
3. Perform the connection procedure under another environment and verify whether the issue is resolved.
If the issue persists, can you provide related screenshots for further troubleshooting?
Best Regards,
Lisa Chen
Lisa Chen
TechNet Community Support -
Hi ,
I am creating a POC for my project.Its using ATG and spring frameworks using RAD 6.first I have created ATG sample project in that same EAR file i created sample Spring project.Both are running in the same EAR.
I want to use spring classes from ATG components to use those methods.that is i should pass parameters to spring project methods and i should get the return value after executing those methods.
I heard that using JNDI look up I can get spring project class objects using that I can invoke spring project methods.
My requirement is two projects will be running in the same EAR.But one project will not be having information about other projects.both are independent from other.Using JNDI look up i need to invoke Spring project methods.
Please anyone help me how to do this.
I used java:comp/env/com/dao/EmpDAO to get instance of my class EmpDAO.But i am getting naming exception.Can anyone help me how to do this
Thanks in advance.If Tomcat is your servlet/JSP engine, they have a nice bit about how to do it:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html
MOD -
How to use JNDI lookup from a JSP
Hello,
I know I should not be doing this (writing the lookup code in a JSP) but have to do it for some reasons.
I am using this code in my JSP:
try
Context ctx = new InitialContext();
dataSource = (DataSource)ctx.lookup("jdbc/mybillingora");
conn = dataSource.getConnection();
statement = conn.createStatement();
catch(Exception excep)
Is this code enough for a JNDI look up?? When I use this code, I get an exception:
"javax.naming.NameNotFound exception:jdbc/mybillingora"
Do I need to do something else??
Why do we use :
Properties env = new Properties();
env.put(Context.INITIAL_CONTEXT_FACTORY,
"<some_context_factory>");
env.put(Context.PROVIDER_URL, PROVIDER_URL);
env.put(Context.SECURITY_PRINCIPAL, JNDI_USER);
env.put(Context.SECURITY_CREDENTIALS, JNDI_PWD);
InitialContext = new InitialDirContext(env);
where JNDI_USER is the userid If ACL is configured at the JNDI server
where JNDI_PWD is the password If ACL is configured at the JNDI server
Context.INITIAL_CONTEXT_FACTORY is the initial Context factory and depends on ur JNDI service provider.
PROVIDER_URL is the url of the JNDI server containing protocol/ip/port
do i need to use this??
would appreciate your help on this....
ThanksIf Tomcat is your servlet/JSP engine, they have a nice bit about how to do it:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html
MOD -
How to use JNDI in an eWay?
Currently this project is using an Oracle eWay for database communication. However, it is necessary to specify the database URL, user, and password. This is fine as long as these properties won't change, but they are different in each environment (dev, qa, uat, and production). We could create different eDesigner environments, and different deploymnet profiles. But we would prefer to have a single deployment profile so we could then generate a single ear file using the commandline codegen tool. That single ear file will then be promoted through the various stages.
For this to work, we would like to specify a JNDI datasource, rather than the actual database connectivity properties. Is this possible? If not, is there a different eway (JNDI datasource eWay?) that provides this capability?Sorry for the late response,
InitialContext ctxt = new InitialContext();
DataSource ds = (DataSource) ctxt.lookup( "jdbc/DB2Test" );
This is how i'm using the connection pool in my code. I set up a JDBC connection resource/pool, make sure it tests fine, and then I use it in my code above.
The only reason I'm doing this is because I am passing the datasource to a jar.
If you are using an eway to connect to the database, I would suggest using iConfigure. You can overwrite connection parameters without compiling a new EAR file. It's a more 'JCAPS' solution versus a 'Java' solution.
--Adam -
How to use security roles in Weblogic server?
Hello Gurus,
I am new to Weblogic server and I am trying to investigate how to make
use of security roles in weblogic server (5.1.0). Can anyone point me
to some documentation. Specifically, I am looking for instance level,
and method level security and how to use it.
Thanks for taking your time to read this e-mail.
Thank You all in advance,
Hari.You should read the security information in the Servlet 2.2 specification
that WL 5.1 implements:
http://java.sun.com/products/servlet/download.html
Chapter 11 deals with declarative and programmatic security, and includes a
section on roles:
11.4 Roles
A role is an abstract logical grouping of users that is defined by the
Application Developer or
Assembler. When the application is deployed, these roles are mapped by a
Deployer to security
identities, such as principals or groups, in the runtime environment.
A servlet container enforces declarative or programmatic security for the
principal associated with
an incoming request based on the security attributes of that calling
principal. For example,
1. When a deployer has mapped a security role to a user group in the
operational environment. The
user group to which the calling principal belongs is retrieved from its
security attributes. If the
principal's user group matches the user group in the operational environment
that the security
role has been mapped to, the principal is in the security role.
2. When a deployer has mapped a security role to a principal name in a
security policy domain, the
principal name of the calling principal is retrieved from its security
attributes. If the principal is
the same as the principal to which the security role was mapped, the calling
principal is in the
security role.
Cameron Purdy
http://www.tangosol.com
"Hari" <[email protected]> wrote in message
news:[email protected]..
Hello Gurus,
I am new to Weblogic server and I am trying to investigate how to make
use of security roles in weblogic server (5.1.0). Can anyone point me
to some documentation. Specifically, I am looking for instance level,
and method level security and how to use it.
Thanks for taking your time to read this e-mail.
Thank You all in advance,
Hari. -
Help me !!!how to use a DataSource to play and save at the same time??
I create a DataSource :
DataSource ds = Manager.createDataSource(new MediaLocator("rtp://192.168.2.195:10000/audio"));
use this DataSource to create a cloneable DataSource:
ds = Manager.createCloneableDataSource(ds);
use this cloneable DataSource to create two datasource "saveDataSource" and "playDataSource",playDataSourceis used to play,saveDataSource is used to save;
DataSource playDataSource = ((SourceCloneable)ds).createClone();
DataSource saveDataSource = ((SourceCloneable)ds).createClone();
Player player = Manager.createRealizedPlayer(playDataSource);
player.start();
but i can not hear anything ,if i use ds to create a player ,i can hear the voice.
who can help me ,THXThanks you ,now I can play with a clone dataSource ,but i also have a problem about how to save the voice to a local file .
MediaLocator audioFile = new MediaLocator("rtp://192.168.2.210:"+audioPort+"/audio");
DataSource ds = Manager.createDataSource(audioFile);
Processor processor = null;
processor = Manager.createProcessor(ds);
processor.configure();
boolean result = waitForState(processor, processor.Configured);
if (result == false)
System.err.println("configuring failed");
processor.setContentDescriptor(new ContentDescriptor(ContentDescriptor.RAW));
processor.realize();
result = waitForState(processor, processor.Realized);
if (result == false)
System.err.println("realizing failed");
processor.start();
ds = processor.getDataOutput();
DataSource playDataSource = Manager.createCloneableDataSource( ds );
String type = com.sun.media.MimeManager.getMimeType("wav");
type = ContentDescriptor.mimeTypeToPackageName(type);
Processor saveProcessor = Manager.createRealizedProcessor(new ProcessorModel(ds,null,new FileTypeDescriptor(type)));
Player player = javax.media.Manager.createPlayer(playDataSource);
DataSink dsink = Manager.createDataSink(saveProcessor.getDataOutput(), new MediaLocator("file://D:/record/1234.wav"));
System.out.println();
System.out.println("-> Playing file '" + audioFile + "'");
System.out.println(" Press the Enter key to exit");
player.start();
dsink.open();
dsink.start();
saveProcessor.start();i can save a file ,but it can not play. -
How to use runtime datasource with crystal to generate reports
Hi,
I am new to BO Crystal reporting area. In my appliaction I am trying to use runtime data source. My objective is to use a 'List of Java ValueObject(class holding private attributes with public getter setter)s' as report database. I am using version BO XI 3.0.
As per development guide I have to perform the following steps to use runtime datasource
1. Put your manipulated data in a RowSet form that can be processed.
2. Create and fill an com.crystaldecisions.sdk.occa.report.data.IDataset object with the rowset data.
3. Add or set the data source with either the addDataSource or setDataSource methods of DatabaseController class.
API doesn't allow me to set/add "Record"/ "RecordBatch" to RowSet. Please help.
Please note: I have already tried and understand the usage of following types of data sources
1. All types of db conductivities as provided by Crystal designer "Database Expert"
2. Also I have successfully tried & tested transforming "List of Java VOs" into XML, TXT, CSV file format and use them as data source for crystal.Frank Bareuther wrote:
The DBMS is the same, we are only using a different database user to log on.
There is a separate db user for each server.
The EAR with a given datasource name in the entity EJBs should be deployed
on all 4 servers without changing descriptors.Interesting. And what is the value of using a different schema/user in the
different servers? I do believe that this configuration issue can be
achieved but I have not done it myself. I believe there is a way to
have some portions of a managed server's configuration by in a per-server
config file. That would be where you would define the pool. The DataSource
could also be there (with the same name for every server), or it could
be in the common one in the admin server.
I would file a support case to get this documented to show you how to
do what you want.
Joe -
How to use RDBMS Realm in Weblogic Commerce Server?
Hi All,
Same as the subject.
Thx
RayYou should read the security information in the Servlet 2.2 specification
that WL 5.1 implements:
http://java.sun.com/products/servlet/download.html
Chapter 11 deals with declarative and programmatic security, and includes a
section on roles:
11.4 Roles
A role is an abstract logical grouping of users that is defined by the
Application Developer or
Assembler. When the application is deployed, these roles are mapped by a
Deployer to security
identities, such as principals or groups, in the runtime environment.
A servlet container enforces declarative or programmatic security for the
principal associated with
an incoming request based on the security attributes of that calling
principal. For example,
1. When a deployer has mapped a security role to a user group in the
operational environment. The
user group to which the calling principal belongs is retrieved from its
security attributes. If the
principal's user group matches the user group in the operational environment
that the security
role has been mapped to, the principal is in the security role.
2. When a deployer has mapped a security role to a principal name in a
security policy domain, the
principal name of the calling principal is retrieved from its security
attributes. If the principal is
the same as the principal to which the security role was mapped, the calling
principal is in the
security role.
Cameron Purdy
http://www.tangosol.com
"Hari" <[email protected]> wrote in message
news:[email protected]..
Hello Gurus,
I am new to Weblogic server and I am trying to investigate how to make
use of security roles in weblogic server (5.1.0). Can anyone point me
to some documentation. Specifically, I am looking for instance level,
and method level security and how to use it.
Thanks for taking your time to read this e-mail.
Thank You all in advance,
Hari. -
Using jndi.properties with weblogic 6.1
Apologies if this is a basic question - I am new to Weblogic.
I have successfully got a test EJB working with Weblogic 6.1 using a properties object to set up my JNDI InitialContext.
In the weblogic examples I've downloaded it says you can also use a jndi.properties file to do this. I have set up a jndi.properties file, which is in the classpath for my class calling the EJB. But when I do my jndi .lookup("ejbname") I get the error:
javax.naming.CommunicationException: Can't find SerialContextProvider
The weblogic documentation at:
http://e-docs.bea.com/wls/docs61///rmi_iiop/API_rmi_iiop.html
refers to using jndi.properties and says to look at:
http://edocs.bea.com/wls/docs61/jndi/jndi.html
But at this page there is no mention of the jndi.properties method.
I'd be grateful for any suggestions - in particular whether it is possible to use this method of configuring the JNDI setup.
I'm running wlserver6.1 on a Windows 2000 PC, using JDK 1.3.1
My jndi.properties file looks as follows:
java.naming.property.names=java.naming.factory.initial,java.naming.provider.url
java.naming.factory.initial=weblogic.jndi.WLInitialContextFactory
java.naming.provider.url=t3://localhost:7001It is not WebLogic-specific. See
http://java.sun.com/j2se/1.3/docs/api/javax/naming/InitialContext.html
Alison Tunley <[email protected]> wrote:
Apologies if this is a basic question - I am new to Weblogic.
I have successfully got a test EJB working with Weblogic 6.1 using a properties object to set up my JNDI InitialContext.
In the weblogic examples I've downloaded it says you can also use a jndi.properties file to do this. I have set up a jndi.properties file, which is in the classpath for my class calling the EJB. But when I do my jndi .lookup("ejbname") I get the error:
javax.naming.CommunicationException: Can't find SerialContextProvider
The weblogic documentation at:
http://e-docs.bea.com/wls/docs61///rmi_iiop/API_rmi_iiop.html
refers to using jndi.properties and says to look at:
http://edocs.bea.com/wls/docs61/jndi/jndi.html
But at this page there is no mention of the jndi.properties method.
I'd be grateful for any suggestions - in particular whether it is possible to use this method of configuring the JNDI setup.
I'm running wlserver6.1 on a Windows 2000 PC, using JDK 1.3.1
My jndi.properties file looks as follows:
java.naming.property.names=java.naming.factory.initial,java.naming.provider.url
java.naming.factory.initial=weblogic.jndi.WLInitialContextFactory
java.naming.provider.url=t3://localhost:7001--
Dimitri -
How to use JNDI to lookup remote EJB Home?
Hello,
I am writing a servlet to call a remote EJB on another machine.
I use JNDI to lookup remote EJBHome (not) but fail.
Any advice?
Any trick to configure application-client.xml?
Thanks!Use com.evermind.server.rmi.RMIInitialContextFactory instead
Here an example
// EmployeeClient.java
package mypackage5;
import javax.ejb.*;
import javax.naming.*;
import javax.rmi.PortableRemoteObject;
import java.io.*;
import java.util.*;
import java.rmi.RemoteException;
import com.evermind.server.ApplicationClientInitialContextFactory;
import com.evermind.server.rmi.RMIInitialContextFactory;
* A simple client for accessing an EJB.
public class EmployeeClient
public static void main(String[] args)
System.out.println("EmployeeClient.main(): client started...");
try
* initialize JNDI context by setting factory, url and credential
* in a hashtable
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory");
//env.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.ApplicationClientInitialContextFactory");
env.put(Context.PROVIDER_URL, "ormi://koushikm:23791/application4");
env.put(Context.SECURITY_PRINCIPAL, "admin");
env.put(Context.SECURITY_CREDENTIALS, "admin");
* or set these properties in jndi.properties
* or use container defaults if that's where client got launched from
Context context = new InitialContext(env);
* Lookup the EmployeeHome object. The reference is retrieved from the
* application-local context (java:comp/env). The variable is
* specified in the assembly descriptor (META-INF/application-client.xml).
Object homeObject =
context.lookup("HelloEJB");
System.out.println("EmployeeClient.main(): bean found...");
// Narrow the reference to EmployeeHome.
HelloEJBHome home =
(HelloEJBHome) PortableRemoteObject.narrow(homeObject,
HelloEJBHome.class);
System.out.println("EmployeeClient.main(): home narrowed...");
// Create remote object and narrow the reference to Employee.
HelloEJB remote =
(HelloEJB) PortableRemoteObject.narrow(home.create(), HelloEJB.class);
System.out.println("EmployeeClient.main(): remote created...");
String message=remote.helloWorld("SUCCESS");
System.out.println(message);
} catch(NumberFormatException e) {
System.err.println("NumberFormatException: " + e.getMessage());
} catch(RemoteException e) {
System.err.println("RemoteException: " + e.getMessage());
} catch(IOException e) {
System.err.println("IOException: " + e.getMessage());
} catch(NamingException e) {
System.err.println("NamingException: " + e.getMessage());
} catch(CreateException e) {
System.err.println("CreateException: " + e.getMessage());
Hello,
I am writing a servlet to call a remote EJB on another machine.
I use JNDI to lookup remote EJBHome (not) but fail.
Any advice?
Any trick to configure application-client.xml?
Thanks! -
How to use multiple datasource in spring and hibernate
HI all,
I want to use multiple data source for my web application.Please suggest me the mapping of xml files viz.
applicationContext-resource.xml,applicationContext-hibernate.xml and applicationContext-service.xml
SHoud i create separate session factory and transaction manager for both the datasource?
Here is my applicationContext-resource.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
"http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean id="dataSource"
class="org.apache.commons.dbcp.BasicDataSource">
<property name="url" value="jdbc:oracle:thin:@192.168.x.x:1521:orcl"/>
<property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"/>
<property name="username" value="dw_lt_staging"/>
<property name="password" value="dw_lt_staging"/>
</bean>
<bean id="dataSourceAnalytics"
class="org.apache.commons.dbcp.BasicDataSource">
<property name="url" value="jdbc:oracle:thin:@192.168.y.y:1521:orcl"/>
<property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"/>
<property name="username" value="dw_analytics"/>
<property name="password" value="dw_analytics"/>
</bean>
</beans>Thanks in advance.HI all,
I want to use multiple data source for my web application.Please suggest me the mapping of xml files viz.
applicationContext-resource.xml,applicationContext-hibernate.xml and applicationContext-service.xml
SHoud i create separate session factory and transaction manager for both the datasource?
Here is my applicationContext-resource.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
"http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean id="dataSource"
class="org.apache.commons.dbcp.BasicDataSource">
<property name="url" value="jdbc:oracle:thin:@192.168.x.x:1521:orcl"/>
<property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"/>
<property name="username" value="dw_lt_staging"/>
<property name="password" value="dw_lt_staging"/>
</bean>
<bean id="dataSourceAnalytics"
class="org.apache.commons.dbcp.BasicDataSource">
<property name="url" value="jdbc:oracle:thin:@192.168.y.y:1521:orcl"/>
<property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"/>
<property name="username" value="dw_analytics"/>
<property name="password" value="dw_analytics"/>
</bean>
</beans>Thanks in advance.
Maybe you are looking for
-
Can't get my HP LaserJet 2100 seating on Linksys PPSX1 Print server to work
Hi, I can find and add the printer on Appletalk protocol. I've even downloaded the driver update from HP's site and installed it on my system but still when I print to this printer I get a few blank pages and a page with one or two line of junk on it
-
Question re: error msg downloading adobe addin using Windows 7
Hello, I found the answer, I was trying to download the adobe add in using Google chrome browser, when I should have been using safari, IE, or Foxfire. Thank you for your input. Sent from my Cricket smartphone
-
In PO how to bring default tick in info update?
In PO how to bring default tick in info update? Please explain me very clear. I know the transaction OMFI is using. I need how to assign with parameter ID? Please be clear?
-
No audio/video/screen-sharing problem in iChat 4.0
I've been using iChat for years (since its original release) and since upgrading to 10.5 I can no longer audio or video chat; and the new screen-sharing option doesn't work either. I connect to the net through an AirPort wireless network, which is co
-
How to use Expression Edit in the LabVIEW control (teststand category)?
Hi All, I am developing the teststand specify module using LabVIEW. I found that is Expression Edit control in the Labview Controls pallete. does anyone have any example? I have enabled the expression browser button but I dont know how to link it to