Separation of WebService & Enterprise Java Beans on two different Machines
All,
Have anybody been able to separate the webservices and the ejb's into two weblogic
servers. To be precise, I want to invoke a web service and the web service should
be able to talk to the weblogic server a different one than that is hosting the
webservice to execute the ejb methods.
Any help would be appreciated.
Thanks,
--Pratap
Rob, thanks for your input. theoretically,
i agree with you. but using a pure web server
to pick up web services request nicely fits
the already widely accepted web-tier/ejb-tier
design and implementation.
could you please take a look at my message
184 Help needed in web service example - "david zhang" , 10 Dec 2001
i really need some help on that. thanks in advance.
david
Rob Woollen <[email protected]> wrote:
There's pros and cons to both approaches.
The reasons that I generally recommend co-location are:
1) Much better performance -- We can optimize the web/web service -->
EJB call to be a direct method call. If they are in separate
processes/machines, you will need to go through rmi marshalling and
unmarshalling of the data and send your requests over a network connection.
2) one less remote programming error case to handle -- Anytime that you
make a remote call, you need to handle a set of error cases that do not
occur with in-process calls. Failures during marshalling, sending the
request, during the response etc. Distributed programming is hard.
I would avoid it whenever possible.
-- Rob
david zhang wrote:
maybe i have the same thoughts as Pratap has.
i notice that this is actually a difference
between Apache SOAP implmentation and Weblogic
web service implementation. In the Apache's
implementation, a pure WEB server with a servlet
engine is able to pick up a service request.
if the request handler needs to use an EJB running on
another application server, it just call it.
so with apache implementation, i can put all EJBs
on one application server. with weblogic's implementation,
there has to be an APPLICATION server up front to
to pick up a web service. sounds like an overkill or
in elegant design. actually, Sun blueprints has an article
"Initial Thoughts on Web Services", and it is my understanding
that a web tier should pick up a web service.
Rob, please give us the magic:-)
regards,
david
Rob Woollen <[email protected]> wrote:
It's possible to do this, but I wouldn't recommend the configuration.
Why do you
want to do this?
-- Rob
Pratap Srivastav wrote:
All,
Have anybody been able to separate the webservices and the ejb's
into
two weblogic
servers. To be precise, I want to invoke a web service and the
web
service should
be able to talk to the weblogic server a different one than that
is
hosting the
webservice to execute the ejb methods.
Any help would be appreciated.
Thanks,
--Pratap
Similar Messages
-
Hi,
I am a java programmer. I have worked with applets,
servlets, jdbc, etc., but I have never worked with EJB's
Is there a good tutorial of it? Does it depend on certain
API's? Where can I find the classes? I would like to learn
and to develop some applications with EJB's. I will appreciate a lot if someone give me the 1,2,3... of EJB's.
Thanks in advanceThere are suspisiously many tutorials and materials on the Web about EJB.
The principals ones are at Sun's J2EE site:
http://java.sun.com/j2ee/tutorial/doc/J2eeTutorialTOC.html
PetStore Demo
http://java.sun.com/j2ee/download.html#blueprints
JGuru Exercises:
http://developer.java.sun.com/developer/onlineTraining/EJBIntro/exercises.html
Also, look at TheServerSide.com
http://theserverside.com/home/index.jsp
Tutorial on Monson-Haefer "Enterprise Java Bean" book:
http://www.techquestion.net/ejbs/cabinbean1.html
Be careful, however, sometimes it is difficult to repeate
what you have in tutorial.
Good luck,
Jacob Nikom -
Hi Guys,
Ive built a system which uses 8/9 servlets and connects to a postgres database, reads csv files and a few other things, now Ive been asked to implement this using java enterprise beans, how easy/difficult is this? how would I go about it and whats the advantages of using enterprise java beans?
Thanks
TzafCan anyone help?
Thanks
Tzaf -
Adding new enterprise java beans in STUDIO CREATOR
I downloaded the 30 days trial version of Studio creator.
In my server navigator pane there is no Enterprise Java Beans node. How can I enable this nodeHi,
Can we consider this a duplicate thread of :
http://swforum.sun.com/jive/thread.jspa?threadID=53446&tstart=0
Thanks,
RK -
What is an enterprise java bean
Hi,
What is an enterprise java bean. How is it different from normal java means.
Thanks a lot,
Chamal.Well an EJB is a object components that lives in the server's container's guts, there are 3 kinds of EJB:
* Session Beans: performs bussines operations
* Entity Beans: represents a table from a relational database
* Message Driven Beans: receives and controlls messages.
more information about it can be found at: http://java.sun.com/products/ejb/reference/docs/index.html -
The differents between Java Beans and Enterprise Java Beans
Please help me!
What is the differents between JavaBeans and Enterprise Java Beans (EJB) ?
Thank's for your answerEnterprise Java Beans are special type of java beans.
EJBs invented to be used via remote VMs or remote computer
systems.They must be deployed on server to become accesible for remote
clients. -
Missing Enterprise Java Beans Node
I downloaded the Studio Creator 30 day trial version.
But In the server navigator pane there is no Enterprise Java Beans node listed.
How can I enable the Enterprise Java Beans Node in Studio Creator? Or is it a limited version?
Please reply asap.
Thanks in advanceHi.
Porduct version information was as follows....
Java Studio Creator(Build 040903).
Does this mean that I need to upgrade my IDE to update 7?
Thanks a lot for the reply. I almost spent half a day trying to enable the Enterprise Java Beans Node using creator options.
And can I deploy an ear file to creator which I have compiled using JDK1.5?
Thanx again.
Look forward to hearsing from u soon,
Kevin -
Generally when creating a Word file from either a Mac or Win7 pc and opening it on two different machines (either one first) it always prompts that the file is open and will be opened as read only.
However opening a CSS file does not prompt that it is already open on or from any machine which is causing code edits to be lost.
What we found from out testing:
- The file can be saved from one user to the server and WILL NOT PROMPT on other machines until the saving machine has the Dreamweaver program closed completely
- The file can be closed and Dreamweaver minimised to the launch bar but it still will not register on other machines that it has been changed.
- Also, until the Dreamweaver program is closed on the machines, it will continue to open it's saved version of the file.
Example Scenario:
- User 1 opens test.css (which is 2000 lines) and adds some code to the end of the file to bring it up to 2500 lines
- Meanwhile User 2 opens test.css as well (opens as 2000 lines as User 1’s edits have not yet been saved) and adds in code to bring it to 2300 lines
- User 1 saves his file and closes it - but Dreamweaver is still open.
- User 2 also saves his file and leaves Dreamweaver open.
- The server will report the size and last edit of the file the same as User 2 as he was the last person to save it (and if you open from the Win7 Machine it will show as User 2’s 2300 line version)
- If User 1 then open's the file again (from either the 'recent' in Dreamweaver OR clicking on the file directly in Finder...which version opens.... The version that User 1 saved! Not the true version on the server, but the version that User 1 edited and saved with 2500 lines in it.
- Same for User 2, he will open 'his' version with 2300 lines in.
Other information:
- Files are opened directly from the server
- Sometimes the users will save incrementally and re-open
- Most of the time users will save incrementally and keep the files open
- The users will never not save incrementally and just save when closing the file once finished
- The users are usually working on the files all day
- It is always the bottom lines of code that are lost. It could be a case of the two versions being mixed up and cutting off the newly added lines based on the line count (possibly).
It is as if Dreamweaver is holding a cache of the version locally and then only properly looking back to the server when it has been completely closed. It is very difficult to see how the server is causing such an impact on these files, there are very few logs which are giving any indication to the root cause of the problems.
Anyone know if this is a known issue?
Is there a way that there can be a featured implemented on the server that doesn't allow another user to open a file if it is already open on another machine?
ThanksYour server file handling has nothing, and really nothing to do with Adobe software. If files don't get locked for (over-)writing and/or lose connection to the program opening them, then your server is misconfigured. It's as plain and simple and that. Anything from "known file types"/ file associations not being set correctly, MIME types being botched, crooked user privileges and file permissions, missing Mac server extensions, delayed file writing on the server, generic network timeout issues and what have you. Either way, you have written a longwinded post with no real value since you haven't bothered to provide any proper technical info, most notably about the alleged server. Either way, the only way you can "fix" it is by straightening out your server and network configuration, not some magic switch in Adobe's software.
Mylenium -
JDBC connection to two different machines from the same program
I want to use JDBC to connect to two different databases that are on two different MySQL installations on two different machines.
One of the installations is MySQL 4.1.12 and the other is 4.1.14-nt
For some reason, all my statements seem to be going only to one machine, even though I am very clearly set it up to go to two different machines.
Does anyone know whether connecting to two different installations from one program presents any unusual problems?
Thanks.Unless there is some horrible defect in the MySQL JDBC driver (which I doubt!), there should be no problem and like the other poster says, please post snippits of your code so we can see what your doing...
-
Screen saver won't start since Lion upgrade. Two different machines, same issue.
Screen saver won't start since Lion upgrade. Two different machines, same issue. Help
For anyone following this thread, I've found a solution to my problem. Turns out that a cute widget called FishTank appears to be the culprit. With it running in Dashboard (even when I don't see Dashboard) the Screensaver and Sleep functions don't work. I turned it off, not because I'm clever, just because I tired of it, and voilà, Screensaver and Sleep are now working. It can stay in my widgets list without any problem, it just can't be turned on. I'm going to delete it anyway, however.
Hope this points the way to solutions for some of the rest of you!
Cheers!
Keith -
Possible solution to avoid deadlock when two inserts happen on same table from two different machines.
Below are the details from deadlock trace.
Deadlock encountered .... Printing deadlock information
Wait-for graph
NULL
Node:1
KEY: 8:72057594811318272 (ffffffffffff) CleanCnt:3 Mode:RangeS-S Flags: 0x1
Grant List 2:
Owner:0x00000013F494A980 Mode: RangeS-S Flg:0x40 Ref:0 Life:02000000 SPID:376 ECID:0 XactLockInfo: 0x000000055014F400
SPID: 376 ECID: 0 Statement Type: INSERT Line #: 70
Input Buf: RPC Event: Proc [Database Id = 8 Object Id = 89923542]
Requested by:
ResType:LockOwner Stype:'OR'Xdes:0x0000002AA53383B0 Mode: RangeI-N SPID:238 BatchID:0 ECID:0 TaskProxy:(0x00000027669B4538) Value:0x10d8d500 Cost:(0/38828)
NULL
Node:2
KEY: 8:72057594811318272 (ffffffffffff) CleanCnt:3 Mode:RangeS-S Flags: 0x1
Grant List 2:
Owner:0x0000000B3486A780 Mode: RangeS-S Flg:0x40 Ref:0 Life:02000000 SPID:238 ECID:0 XactLockInfo: 0x0000002AA53383F0
SPID: 238 ECID: 0 Statement Type: INSERT Line #: 70
Input Buf: RPC Event: Proc [Database Id = 8 Object Id = 89923542]
Requested by:
ResType:LockOwner Stype:'OR'Xdes:0x000000055014F3C0 Mode: RangeI-N SPID:376 BatchID:0 ECID:0 TaskProxy:(0x000000080426E538) Value:0x30614e80 Cost:(0/41748)
NULL
Victim Resource Owner:
ResType:LockOwner Stype:'OR'Xdes:0x0000002AA53383B0 Mode: RangeI-N SPID:238 BatchID:0 ECID:0 TaskProxy:(0x00000027669B4538) Value:0x10d8d500 Cost:(0/38828)
deadlock-list
deadlock victim=process5daddc8
process-list
process id=process5daddc8 taskpriority=0 logused=38828 waitresource=KEY: 8:72057594811318272 (ffffffffffff) waittime=2444 ownerId=2994026815 transactionname=user_transaction lasttranstarted=2014-07-25T12:46:57.347 XDES=0x2aa53383b0 lockMode=RangeI-N schedulerid=43 kpid=14156 status=suspended spid=238 sbid=0 ecid=0 priority=0 trancount=2 lastbatchstarted=2014-07-25T12:46:57.463 lastbatchcompleted=2014-07-25T12:46:57.463 clientapp=pa hostname=pa02 hostpid=1596 loginname=myuser isolationlevel=serializable (4) xactid=2994026815 currentdb=8 lockTimeout=4294967295 clientoption1=671088672 clientoption2=128056
executionStack
frame procname=mydb.dbo.SaveBill line=70 stmtstart=6148 stmtend=8060 sqlhandle=0x03000800d61f5c056bd3860170a300000100000000000000
INSERT INTO [dbo].[Prod1] .....
inputbuf
Proc [Database Id = 8 Object Id = 89923542]
process id=process5d84988 taskpriority=0 logused=41748 waitresource=KEY: 8:72057594811318272 (ffffffffffff) waittime=2444 ownerId=2994024748 transactionname=user_transaction lasttranstarted=2014-07-25T12:46:57.320 XDES=0x55014f3c0 lockMode=RangeI-N schedulerid=39 kpid=14292 status=suspended spid=376 sbid=0 ecid=0 priority=0 trancount=2 lastbatchstarted=2014-07-25T12:46:57.440 lastbatchcompleted=2014-07-25T12:46:57.440 clientapp=pa hostname=pa01 hostpid=1548 loginname=myuser isolationlevel=serializable (4) xactid=2994024748 currentdb=8 lockTimeout=4294967295 clientoption1=671088672 clientoption2=128056
executionStack
frame procname=pa.dbo.SaveBill line=70 stmtstart=6148 stmtend=8060 sqlhandle=0x03000800d61f5c056bd3860170a300000100000000000000
INSERT INTO [dbo].[Prod1]....
inputbuf
Proc [Database Id = 8 Object Id = 89923542]
resource-list
keylock hobtid=72057594811318272 dbid=8 objectname=pa.dbo.prod1 indexname=PK_a id=lock1608ee1380 mode=RangeS-S associatedObjectId=72057594811318272
owner-list
owner id=process5d84988 mode=RangeS-S
waiter-list
waiter id=process5daddc8 mode=RangeI-N requestType=convert
keylock hobtid=72057594811318272 dbid=8 objectname=pa.dbo.prod1 indexname=PK_a id=lock1608ee1380 mode=RangeS-S associatedObjectId=72057594811318272
owner-list
owner id=process5daddc8 mode=RangeS-S
waiter-list
waiter id=process5d84988 mode=RangeI-N requestType=convertDon't know. Perhaps these can help. I scanned the second link but didn't see much about Ending Deadlocks. I'd say the Fourth link probably has better information than the first three links. But maybe read them all just in case the Fourth is missing something
one of the first three have.
Deadlocking
Detecting and Ending Deadlocks
Minimizing Deadlocks
Handling Deadlocks in SQL Server
Google search for "SQL Deadlock"
La vida loca -
I have two (paid) copies of lightroom 5 from your photography promotion installed (on two different machines). I would like to deactivate one copy on one desktop so I can install a copy on my laptop. How do I go about this?
While the standalone version of LR has no deactivation, the Photography Program which is LR + PS-CC bundled and licensed through the Cloud will have a 2-activation limit per Adobe ID, and you cannot decouple the LR from the PS-CC in the Photographers Bundle.
You can license the cloud on up to two computers per AdobeID by signing into the cloud. When you try to sign in on a third computer you have the option to deactivate the other two copies, which you can do, and then never sign into the cloud on the one computer you don’t want activated and you’ll be fine. -
Accessing RFCs and BAPIs from enterprise java beans
Hello folks,
my question is concerning comunication between EJBs and RFCs. I want to develop a simple session bean that connects to a R/3 back-end, calls a RFC then returns some data, let's say, an example of this could be a list of employees from BAPI_EMPLOYEE_GETDATA.
Ok, by using a web dynpro and adaptive RFC my works could be very very easy, but I'd like to test this way: session (stateless) EJB -> RFC. Can I:
* use JCO.ClientService with a non-portal SAP WAS?
* use embedded JRA (SAP Library stated "The SAP JRA is an add-on for the SAP JCo. If you use the SAP Web AS, the SAP JRA is installed automatically with the SAP JCo.", but I found nothing so in Connector Container Service ...)
* install and configure JRA by myself?
I'm working on a SAP WAS 6.40 Sneak Preview (Java only), and finding a path for easily integrate SAP WAS developed ejbs and external business system. SAP Library suggest to "obtain the JCo connection through the connection framework": is it related to JRA, JCA and SAP Resource Adapter?
Thank you
Pasqualehello
i´ve written a simple stand alone client to test jra connection to a sap system
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.util.Properties;
import javax.resource.cci.Connection;
import javax.resource.cci.ConnectionFactory;
import javax.resource.cci.Interaction;
import javax.resource.cci.MappedRecord;
import javax.resource.cci.RecordFactory;
import javax.resource.cci.ResultSet;
import javax.resource.spi.ManagedConnectionFactory;
import com.sap.mw.jco.jra.*;
public class Example
public void exampleTest()
Properties properties = new Properties();
Connection connection=null;
try
properties.load(new FileInputStream ("props.txt"));
catch(Exception e)
System.out.println("properties could not be loaded");
e.printStackTrace();
try
ManagedConnectionFactory mf = new JRA.ManagedConnectionFactoryImpl(properties);
ConnectionFactory cf = (ConnectionFactory)mf.createConnectionFactory();
connection = cf.getConnection();
RecordFactory rf = cf.getRecordFactory();
Interaction interaction = connection.createInteraction();
MappedRecord request = rf.createMappedRecord("STFC_STRUCTURE");
// Since the STFC_STRUCTURE does not create any new records
// in the data base, you do not need to start a trancation here.
// fill out a structure with dummy data
MappedRecord importstruct = (MappedRecord)request.get("IMPORTSTRUCT");
importstruct.put("RFCFLOAT","1.23456");
importstruct.put("RFCCHAR4","ABCD");
importstruct.put("RFCINT1", "11");
importstruct.put("RFCDATE", "2001-08-24");
// fill out a table with dummi data
ResultSet rfctable = (ResultSet)request.get("RFCTABLE");
for (int i = 0; i < 10; i++)
rfctable.moveToInsertRow();
rfctable.updateString("RFCCHAR4","EFGH");
rfctable.updateInt("RFCINT1", i);
rfctable.updateString("RFCDATE", "1961-08-24");
rfctable.updateDouble("RFCFLOAT",1.65432);
rfctable.insertRow();
// call defined RFC and cast the result to the optional ResultMap interface
ResultMap response = (ResultMap)interaction.execute(null,request);
// release resources
interaction.close();
// create an xml file from the output of the called RFC
// the optional interface ResultMap offers additional methods, like writeXML
FileOutputStream os = new FileOutputStream(response.getRecordName() + "_Structure_from_NotManaged_Example.xml");
response.writeXML(new java.io.OutputStreamWriter(os,"UTF-8"),true);
os.close();
ResultSet resultSet = (ResultSet)response.get("RFCTABLE");
System.out.println("Name of the table is: "+resultSet.getRecordName());
catch (Exception ex)
ex.printStackTrace();
System.exit(1);
finally
if (connection != null)
try
connection.close();
catch(Exception exception1)
public static void main(String[] args)
Example anExample = new Example();
try
anExample.exampleTest();
catch(Throwable t)
t.printStackTrace();
the property file looks like this:
jco.client.client=010
jco.client.user=user
jco.client.passwd=pass
jco.client.ashost=your host
jco.client.sysnr=00
but this only an example for a standalone test client
to use jra inside j2ee first deploy the connector with the settings you need and then get a connection to it using jndi
i don´t have an example at hand for using it inside an ejb or servlet, but if you need one i'll have a look -
SIngle Sign On and Enterprise Java Beans
We are using mod_osso to sign on to a JSP application.
The JSP application then needs to invoke methods on EJBs residing in a different OC4J.
How does the JSP application bind to the EJB such that the security credentials of the user who logged in are inherited by the EJB.
Cheers,
Andy.The best approach is to implement the Java applications as SSO partner applications so that they delegate their authentication to the Login Server, thereby leveraging the same credentials as used to login to the Portal.
The SSO-SDK which is required to implement a partner application is available from technet:
Portal Development Kit
SSO Software Development Kit
Example Java Application Written as an SSO Partner App
null -
Enterprise Java Beans how to start??
Hi All,
I am new to EJB. I need to use EJB in my finantial Application.
Can anybody tell me how to start learning EJB??
We are using WebSphere Application Server..There are lots of material availabe ..but its enough to make me confuse..
I dont know what to do and from where to start.It will be good if anybody can guide me.i want conceptual understanding not just implementation guidence.
thanks in advance.I think a good start is
http://java.sun.com/javaee/5/docs/tutorial/doc/index.html
It will give help you to understand...
If you dont preffer to study thousands sites of material... (Im wondering why :-) ), you can start by:
http://wiki.jboss.org/wiki/Wiki.jsp?page=StarterSkeletonEclipseProject
http://www.onjava.com/pub/a/onjava/2006/05/17/standardizing-with-ejb3-java-persistence-api.html
http://www.javaworld.com/javaworld/jw-08-2004/jw-0809-ejb.html
and the very good collection of materials is also available here:
http://www.javaworld.com/channel_content/jw-ejbs-index.shtml?
quick overview:
http://www.solarmetric.com/resources/ejb-api-quickref.pdf
timony
Maybe you are looking for
-
Visual Studio generates wrong proxy and client config for WCF Service Host with customBinding
Hi, I have a simple WCF test service. The serviceModel configuration for the looks like this: <system.serviceModel> <bindings> <customBinding> <binding name="NewBinding0"> <byteStreamMessageEncoding> <readerQuotas maxDepth="10" maxStringContentLengt
-
Can I use touch ID for App Store without using a passcode?
It seems that the ony way I can use the touch ID for App Store and iTunes is if I have a passcode to get into my phone. I don't want a passcode, it get in and out of my phone too often to have to unlock it all the time and I hate manually typing in m
-
How do I get iPad to see my Apple TV?
New to apple...iPad and Mac all at once...should be easy but I can't find it...
-
System service not activate in managed system
Hello, I am implementing SAP Solution Manager Diagnostics. 1. I am working in Phase 3 - Managed System Configuration 2. Connect Managed system. When I start this step, I get this error : Please import the actual support package for SAP_BASIS or activ
-
What to do if you don't receive texts or messages
When I attempt to call or text someone, the call says "call failed" and the text message says "message send failure". This has been going on for three days and I have tried everything to get them to send. Also, I am not receiving calls or text messag