Contact Two Datasources in Weblogic 10 in a single transaction
Hi,
my requirement is to create two datasource which points to two different schemas of oracle 10 g database.
In a single transaction i may be in requireemnt of contacting both the datasource to get respective db connection and do a insert/update.
I created two datasources A and B which use Oracle 9 thin driver.
When my application starts my app is able to get connection of datasource A and unable to get connection on datasource B. what may be the problem ??
both uses Oracle non-XA driver with one phase commit;
Let me know how to connect to two diff datasources in a single transaction.
Thanks in Advance.
Sreehari.
Do you get like any error for second datasource like jndi lookup failed or exactly what do you see error. If I understand your usecase:
DataSource_1 -> Uses ConnectionPool_1 -> DB Schema_1
DataSource_2 -> Uses ConnectionPool_2 -> DB Schema_2.
So in your java application, I guess you are using JNDI Lookup and pass above Datasources unique JNDI names, and get 2 instances. I mean you have like 2 sets of Jndi lookup code to get 2 connection objects. This looks pretty straight forward. Does not matter what drivers you use.
Are you reusing any objects in your code, like have a single connection object and then close it and try to recycle it for second something like that...If not, check for any errors in the log files.
Ravi Jegga
Similar Messages
-
How to join two DataSource in a single InfoSource
Hello,
I have got two datasources which both share the same primary key (Field IDCO) and also have several individual fields. For example:
Datasource 1:
| IDCO | price |
Datasource 2:
| IDCO | amount |
Now I would like to join both datasources into a single InfoSource that should look like:
| IDCO | amount | price |
In plain SQL I would do something like
Select ... from datasource1 inner join datasource2 on datasource1.IDCO = datasource2.IDCO
Any ideas how this can be achieved be achieved in the Data Warehousing Workbench?
Best Regards
ChristophHi Christoph Außem, welcome to SDN world....
Steps:
1. Create a InfoSource with |IDCO | price | amount - InfoObjects. then map Datasource 1 with InfoSource here Mapping is like below..
DataSource1-IDCO = InfoSource-IDCO
DataSource1-Price = InfoSource- price
EMPTY (NULL ) = InfoSource- Amount
DataSource2-IDCO = InfoSource-IDCO
DataSource2-Amount = InfoSource-Amount
EMPTY (NULL ) = InfoSource- Price.
In this wasy you can map the fields and InfoObjects.
Thanks
Reddy -
Different Options while creating a Datasource in Weblogic
Hi
I am using Weblogic 11 as Application Server .
While in the process of creating a DataSource in Weblogic , i came across different options such as for Instance Connections , for Service Connections.
Please tell me whats the difference in these two ??
Whats the difference in Oracle Drivers (Thin) for Instance Connections versions 9 , 10 , 11
Whats the difference in Oracle Drivers (Thin) for Service Connections 9 , 10 , 11
Thanks in advance .Hi,
Your query is replied by Joe Weistine (JDBC Expert) Please find the answer:
http://forums.oracle.com/forums/message.jspa?messageID=4029371
You can directly post your JDBC related querries to JDBC Forum directly to get to get Quick/appropriate/correct answers and attention from JDBC experts... WebLogic Server - JDBC (Forum ID)
Thanks
Jay SenSharma
Edited by: Jay SenSharma on Jan 16, 2010 10:38 AM -
Installing two OBIEE 11g instances in a single windows machine
Dear Experts
As a part of one of the client requirements , I need to install and configure two instances of OBIEE11g in a single windows server 2003.
Is it possible , and if you could let know how to achieve that. Here I mean would I be able to run two rpd 's and catalogs. Can I use differnt port and differnt weblogic domain for the same.
Pls. respond..
RegdsHi,
Yes ofcourse, we can have two instances on the same machine. However, we need to make sure that they do not conflict each other for the ports/node manager etc. Apart from this, I understand that you have to obey to some restrictions too here.
1. Starting/Stopping BI Components needs to have a variable BI_SERVER_HOME set in the system. Now that you have two homes, I think you cannot set this. However, you can still start/stop BI Services through command line.
May be others can add in their opinion here.
Thank you,
Dhar -
How to add two different page numbers in a single page
How to add two different page numbers in a single page? One is for page number of the whole article, the other one is for page number for each chapter in the article.
It's quite complicated, see
Two Page Numbering Schemes in the Same Document.
Regards, Hans Vogelaar (http://www.eileenslounge.com) -
How can I maintain two separate itunes accounts on one single device (iPhone 4) without erasing either set of data when syncing with itunes?
Hi,
Depends on what you trying to setup but for purchases, you can roll down at the very end of the iTunes/AppStore pages to logout of your current account and then login into a different one. Then your purchase will be billded to this new account. Everything will sync as you used to but in order to use the purchased content in iTunes or other devices, you will need to authorize them (you can have up to 5 devices authorized for an account). -
Can not connect datasource in weblogic server
I have written a test class. I create datasource in weblogic server 11g(datasource name =fdbusionline jndi name = 'jdbc/fdbusionline' ) and start weblogic server. but always report the following error:
javax.naming.NameNotFoundException: Unable to resolve 'fdbusionline'. Resolved '' [Root exception is javax.naming.NameNotFoundException: Unable to resolve 'fdbusionline'. Resolved '']; remaining name 'fdbusionline'
at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:234)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:348)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:259)
at weblogic.jndi.internal.ServerNamingNode_1035_WLStub.lookup(Unknown Source)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:423)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:411)
at com.fd.busionline.test.appinterface.impl.DataSourceTest.testConnectDataSource(DataSourceTest.java:54)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:73)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:46)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
at oracle.jdevimpl.junit.runner.junit4.JUnit4Testable.run(JUnit4Testable.java:24)
at oracle.jdevimpl.junit.runner.TestExecution.run(TestExecution.java:27)
at oracle.jdevimpl.junit.runner.JUnitTestRunner.main(JUnitTestRunner.java:88)
Caused by: javax.naming.NameNotFoundException: Unable to resolve 'fdbusionline'. Resolved ''
at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:1139)
at weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.java:252)
at weblogic.jndi.internal.ServerNamingNode.lookupHere(ServerNamingNode.java:182)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:206)
at weblogic.jndi.internal.RootNamingNode_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:667)
at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:230)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:522)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:518)
at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
@test
public void testConnectDataSource(){
Connection conn = null;
Context ctx = null;
try{
// Hashtable env = new Hashtable();
// env.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
// env.put(Context.PROVIDER_URL, "t3://localhost:7001");
// env.put(InitialContext.SECURITY_PRINCIPAL, "weblogic");
// env.put(InitialContext.SECURITY_CREDENTIALS, "!QAZ2wsx");
Environment env=new Environment();
env.setProviderUrl("t3://localhost:7001");
env.setSecurityPrincipal("weblogic");
env.setSecurityCredentials("!QAZ2wsx");
ctx = new InitialContext();
ctx=env.getInitialContext();
Object obj = ctx.lookup("fdbusionline");// can not work
Object obj = ctx.lookup("jdbc/fdbusionline"); // can not work
DataSource ds = (DataSource) PortableRemoteObject.narrow(obj, DataSource.class);
conn = ds.getConnection();
Statement stmt = conn.createStatement();
String sql = "select sysdate from dual";
ResultSet rs = stmt.executeQuery(sql);
while (rs.next()) {
System.out.println(rs.getDate(1));
} catch (Exception e) {
e.printStackTrace();
}finally{
System.out.println("Test Datasource Connection");
who can help me? Any help will be appreciated greatlyOkay, but are you sure that the datasource is actually deployed? Does the server log or the management interface of weblogic actually report that the datasource was deployed succesfully under the name you specify? And did you double check if you don't have any name mismatches (such as a typo or an upper/lowercase mismatch)?
I ask because the connection to the server appears to be working, but the lookup of the name gives no results - the only thing I can think of is that the resource really is not deployed even if you believe it is.
A few observations:
- you may want to put your JNDI credentials in a jndi.properties file in the root of the classpath in stead of hardcoding them (but you may hardcode for now as a quick test of course)
- the correct lookup should be to "jdbc/fdbusionline", in other words you use the jndi-name.
ctx = new InitialContext();
ctx=env.getInitialContext();the env.getInitialContext() really is not necessary, I would remove it. -
Creating Source systems in two same logical BW systems from single R/3 sys
Hi All,
We are facing an issue while creating Source systems in two same logical BW systems, from single R/3 systems. Our Basis team is telling that if we want to connect the single R/3 system into 2 BW systems with same logical name, we will need to delete the source systems from one BW systems and create in another system. Also they told by doing so it will delete all the transfer rules and PSA table existing in the current BW system, which has the source system connectivity with the R3 system now.
Is this anyway to create the same source systems in two same logical BW systems, from single R/3 systems without deleting the transfer rules?. Also please help us to get anu OSS note or document explaining this in details.
Regards.
Muruganand.KHi Muruganand,
I dont think it is possible as connecting one R/3 Source System to two BW Systems.
If you could get the possible solution, please do reply to the post.
Regards,
Kiran -
Best way to join information from two datasources??? pls help
Guys Please help in understanding the basics of modelling in terms of best practises in SAP-BI
I have two datasources. One is standard Bussiness content datasources 2LIS_02_ITM ( having PO item level data) and the other is a generic datasource on table EBAN (having PR details). Now all my report requirements are on both PO and PR information.So i need to club these datasources or its corresponding DSO's or its corresponding cubes.
Please suggest the best of the following solutions:
solution 1 and 2
2LIS_02_ITM -
> DSO1 -
> PO cube
Gener Datasourceon EBAN -
> DSO2----
> PR Cube
solution one is to go and build multiprovider joining with PR no in either cubes
solution two is to go and build infoset joining with PR no in either cubes
solution 3
2LIS_02_ITM -
> DSO1 -
> cube
Gener Datasourceon EBAN -
> DSO2
while populating data from DSO1 to cube we lookup on to DSO2 and read the PR data , thus consolidating both PR and PO data in the cube
solution 4
Here i can plan to combine two datasources 2LIS_02_ITM ,Gener Datasourceon EBAN into one infosource.
(2LIS_02_ITM ,Gener Datasource on EBAN)---->infosource->DSO-->cube
solution 5
i can club both PO and PR information at the r/3 side only into a view and build a generic datasource on that... then bring the whole data into one DSO and cube and report on that....
Please do help me guys.... i will award points to all who adds some imp information.Hello Venkata
We use approach
1/2 when we have different data comming fromsource and data amount is huge and lot of transformation is there
3 You can use this approach here but lookup in other ODS is also time consuming also any changes which may be done in future wouldd need corresponding changes in the ODS
4. We should always use infosource even if BI/7 as it provides very much flexibility and scalability...but when u r combining these two DS you need to make sure u r extracting proper record
I dont know if you are talking abt extractor enhancement in this point...i would suggest if no. of field to be enhanced is less than u can go for it...
5. IOfcourse u can create a view but its better to enhance extractor becuae SAP has already provided DS for 2LIS_02_ITM...
We have done the same thing but we were having only 7-8 PR fields ...so we just enhanced the structure.......
Thanks
Tripple k -
Creating txn datasource in weblogic 10.3
Hi,
Can anyone help me to create transactional datasources in weblogic 10.3. We are migrating our application from 8.1 to 10.3 and migrated existing datasources to 10.3. While executing ejb's it is giving the following error.
java.sql.SQLException: Connection has already been created in this tx context for pool named <Pool 1> Illegal attempt to create connection from another pool: <Pool 2>
In 8.1, we have only one connection pool associated with many txn datasources. In 10.3 created separate pool for each data source from same DB with following properties for txn.
--Supports global transaction with one-phase commit.
Used oracle.jdbc.OracleDriver driver class.
Thanks in advance.You need to use an XA driver to span multiple resources such as oracle.jdbc.xa.client.OracleXADataSource
See this article, which has some info on XA even if you aren't using RAC
http://www.oracle.com/technology/products/weblogic/OracleWLS_RAC.pdf -
Connecting to TimesTen using DataSource in WebLogic on Linux
We are trying to use weblogic 9.2 to connect to TimesTen7.0, both are on Linux.
We have installed Oracle 10g client and then installed TimesTen 7.0 Client on the Linux server hosting weblogic.
Created Client DSN in /var/TimesTen/sys.odbc.ini file as follows:
[ODBC Data Sources]
TTclientMaster=TimesTen 7.0 Client Driver
[TTclientMaster]
TTC_SERVER="TTServerHostName"
TTC_SERVER_DSN=TTmaster
When we are trying to create DataSource in weblogic Admin console it does not show up TTClient Driver in the list.
We tried setting up using "Others" for driver and databasetype but then it asks for databasename which we don't have since TT uses DSN.
We are looking for any pointers or references that can explain how to configure weblogic to use TimesTen using TT 7.0 client DSN.If you have access to a copy of TimesTen 6.0 you can look in the AppServer Configuration Guide (appsrv.pdf) that was shipped with that release. This guide is currently being rewritten and so is not yet available for 7.0.
If you can't get hold of a copy, e-mail me at [email protected] and I'll send it to you.
Chris -
Can I run two Apple TV units off a single account on separate devices
Can
I run two Apple TV units off a single account on separate devicesYes you can do that.
-
Merging two separate MUSE sites into a single MENU system and Paid & online BC eCommerce site
Hi all! I am stuck trying to figure out a Process Conundrum:
1> I have a BC site with e-commerce ready to go - paid - online with store template in place.
2> I also Have a 2nd MUSE created web site (with the client content/pages) that needs to merge with that E-commerce BC site.
What is the move to merge the two separate sites into a single site with the Menus all in proper order?
Is this simple and I can not see it? (merge the two sites in a folder and reopen in muse for new menus?
Or do i need Dreamweaver to assist in the merge?
In other words:
What is the PATH/PROCESS to merge a 2nd MUSE designed web site (sans e-commerce), in order to tie into the online BC e-commerce template paid site - so the menus update together as "one" site?
Menu Update Concern: merging two separate MUSE sites into a single MENU system with the "Paid on line Active BC e-commerce Template". How do it do it Process wise so that the menus adjust automatically... so they are "one" menu.
Reminds me of an old joke: Q: "What did the Buddhist say to the hot dog vendor at the ball park?"
A: "Make me one with everything!"
ONWARD>>>>>
Possible paths I am about to take attempting to Solve the problem - and scale the learning curve...
download the BC e-commerce site into Dreamweaver -
export the 2nd muse site by publishing it to a unique folder.
combine them by going back into dream weaver and attempting to figure out linking the menus. - perhaps they are automatic there too.
or load them both up to BC and back down to MUSE to fix the menus?
I appreciate Any recommendations, hits or humor that you could help on this.
Cheers!Thanks, Liam... I will get it eventually...
Sadly: I do not have a budget to hire this out...
- I have gone through lots of the BC and Muse training exercises. Adobe
and BC Gurus.
But... if the only problem is that I need to work though my partner site BC
interface...
- that would be fine...
- so would using dream weaver....
I will go back and review the BC interface and also dreamweaver
capabilities.
without a budget... i need to figure it out... please do point to any
material or training you might be able to point me to.
I don't have to use muse, if that is my sticking point. I just need to get
the project up and BC looks perfect.
Thanks. -
Combining Conditions with two DataSources
Hello All,
The following Code is to Set two condition to load my data, but my problem is that they are not combining. Is there a way to put two DataSources to a Condition? Or is there a way to Combined them?
'//Activates Query
'// getting the data sources from the form
Set oDBDataSource = Form.DataSources.DBDataSources.Item("RDR1")
Set oDBDataSource2 = Form.DataSources.DBDataSources.Item("ORDR")
'// Query the DB Data source
'// create a new conditions collection
Set pConds = New Conditions
Set pConds2 = New Conditions
'// (CardCode = inputted Cust No)
Set pCond2 = pConds2.Add()
pCond2.BracketOpenNum = 1
pCond2.Alias = "CardCode" 'FIELD NAME
pCond2.Operation = co_EQUAL
pCond2.CondVal = CCode
pCond2.BracketCloseNum = 1
'// Execute the query with the conditions collections
oDBDataSource2.Query (pConds2)
'// where clause
'// (LineStatus = 'O') //O = Open order//
Set pCond = pConds.Add()
pCond.BracketOpenNum = 1
pCond.Alias = "LineStatus" 'FIELD NAME
pCond.Operation = co_EQUAL
pCond.CondVal = "O"
pCond.BracketCloseNum = 1
'// Execute the query with the conditions collections
oDBDataSource.Query pConds
'// set the user data source data
For i = 0 To oDBDataSource.Size - 1
oDBDataSource.Offset = i
oMatrix.AddRow
Next iHi Laura,
I think the discussion in this thread will give you the answer:
JIONs-Query as MatrixDataSourse
Regards,
Frank -
Is able to run two webservices in Weblogic 7.0 trial version ?
Hi all:
I caught a webservice problem in weblogic7.0 (trial version).
I have built an Session Bean example (examples\webservices\complex\statelessSession)
in Weblogic 7.0 Examples Service, it works as expected.
However, when I create another session bean following the above example with different
Service Name and JNDI Name, the new session bean cannot work as expected(No WSDL
URL is found).
Is able to run two webservices in Weblogic 7.0 trial version?
How can I run two and more webservices in Weblogic 7.0 trial version?
If anyone know how to solve it, please reply me as soon as possible.Hi Kelvin,
Could you check your server log file for any errors. If there are errors, would you post them here. It sounds like the second webservice is simply not being
deployed for some reason.
In the application.xml, make sure you have given each webservice a different <context-root>
As a suggestion, make the <display-name> and the <context-root> the same, for example using: "TreeClock" then you should be able to find the webservice:
http://<host>:<port>/TreeClock/TreeClock
Bruce
Kelvin wrote:
Bruce:
Thanks your help !!! Sorry to confuse you as we are actually using the GA version
(download form BWA for evaluation).
The problem is like this, when we developed two web service and deploy both.
Only one of them can show up by quene the ?wsdl.
Any additional info that we can provide ???
Many thanks !!!
Regards
Kelvin
Bruce Stephens <[email protected]> wrote:
Hi Kelvin,
By "trial version" if you mean the WLS 7.0 Beta program, thanks for giving
this a spin
however the final version of WLS 7.0 was Generally Available as of 4/30/02
and the Beta
program closed.
We have an example that illustrates how to build a client that invokes two
webservices.
You can get a copy from the dev2dev center:
http://dev2dev.bea.com/managed_content/direct/webservice/simple2.zip
Hope this helps,
Bruce
Kelvin wrote:
Hi all:
I caught a webservice problem in weblogic7.0 (trial version).
I have built an Session Bean example (examples\webservices\complex\statelessSession)
in Weblogic 7.0 Examples Service, it works as expected.
However, when I create another session bean following the above examplewith different
Service Name and JNDI Name, the new session bean cannot work as expected(NoWSDL
URL is found).
Is able to run two webservices in Weblogic 7.0 trial version?
How can I run two and more webservices in Weblogic 7.0 trial version?
If anyone know how to solve it, please reply me as soon as possible.<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Hi Kelvin,
<p>By "trial version" if you mean the WLS 7.0 Beta program, thanks for
giving this a spin however the final version of WLS 7.0 was Generally Available
as of 4/30/02 and the Beta program closed.
<p>We have an example that illustrates how to build a client that invokes
two webservices. You can get a copy from the dev2dev
center:
<p>http://dev2dev.bea.com/managed_content/direct/webservice/simple2.zip
<br>
<p>Hope this helps,
<br>Bruce
<br>
<p>Kelvin wrote:
<blockquote TYPE=CITE>Hi all:
<p>I caught a webservice problem in weblogic7.0 (trial version).
<p>I have built an Session Bean example (examples\webservices\complex\statelessSession)
<br>in Weblogic 7.0 Examples Service, it works as expected.
<br>However, when I create another session bean following the above example
with different
<br>Service Name and JNDI Name, the new session bean cannot work as expected(No
WSDL
<br>URL is found).
<p>Is able to run two webservices in Weblogic 7.0 trial version?
<br>How can I run two and more webservices in Weblogic 7.0 trial
version?
<p>If anyone know how to solve it, please reply me as soon as possible.</blockquote>
</html>
Maybe you are looking for
-
After syncing my nano the synced content, purchased TV shows, do not show up on the nano.
-
My computer daily reminds me to update an Iphone/Ipad app to my macbook pro and to my imac. The app is not installed on these devices and is also deleted from my iphone/ipad. There is no way to update because it says it is not possible with my apple
-
With which iPad cables can a keynote presentation be played on a projector with?
I need to know which apple cable to buy so that I can present a keynote presentation from the iPad onto a projector. Does it work with VGA, composite, or component. I have the iPad 1.
-
MRP_FORECAST_DATES clarification
Hi, In MRP_FORECAST_DATES table, what is the unique key leaving transaction_id. I could see duplicates in the table by including the following fields. INVENTORY_ITEM_ID,ORGANIZATION_ID,FORECAST_DESIGNAT OR,FORECAST_DATE,BUCKET_TYPE. I see duplicate r
-
Distribution point, a TFTP error message
Hello, I have a problem when I tried to migrate a computer via PXE Network in an Annex or there is a distribution point, a TFTP error message appears as follows: PXE-E32: TFTP open timeout. TFTP. knowing that this problem does not arise at the main s