Co-location optimization between servlet and ejb?
Find some similar posting in archive, but answers confused me.
If I implement a sesion bean in WL6.1 with remote interfaces and call that session bean from the web tier (i.e. servlet) that is located in the same WL server, will co-location optimization occur.
Some previous posting suggested optimization only occurs within the same classloader. My understanding is servlet have a different class loader than the EJB.
So will co-location optimization still occur?
Thanks
Joe Wroblewski
"Joe Wroblewski" <[email protected]> wrote in message news:32319370.1096294137900.JavaMail.root@jserv5...
Find some similar posting in archive, but answers confused me.
If I implement a sesion bean in WL6.1 with remote interfaces and call that session bean from the web tier (i.e.servlet) that is located in the same WL server, will co-location optimization occur.
>
Some previous posting suggested optimization only occurs within the same classloader. My understanding is servlethave a different class loader than the EJB.
>
So will co-location optimization still occur?In case of a servlet you will have co-location optimization if the ejb-jar and the war are in the same ear. Then was
will inherit EJB classsloader. If it's not the case, pass-by-reference is not possble.
Regards,
Slava Imeshev
Similar Messages
-
Which better between Hibernate and EJB
Hello i am a new begginer in J2EE, i have some question
Which better between Hibernate and EJB ?
i still confuse when must using Hibernate or EJB, because as i know in EJB it can use datasource which can i map to Entity bean.
this function is same as Hibernate as i know.
if my concept is wrong please correct my concept
thx in advancedfbrayuki.darmanto wrote:
Hello i am a new begginer in J2EE, i have some question
Which better between Hibernate and EJB ?Just to clarify, you mean EJB3.x, not the earlier versions.
Define "better".
They're actually pretty similar.
If you use Hibernate instead of EJB3 you don't need a full-blown Java EE app server. You can deploy apps on a servlet/JSP engine or on the desktop.
i still confuse when must using Hibernate or EJB, because as i know in EJB it can use datasource which can i map to Entity bean.
this function is same as Hibernate as i know.
if my concept is wrong please correct my concept
thx in advanced% -
Difference between servlet and filter
difference between servlet and filter
Its not a secret you know; if you just read a little about what they are used for, you answer your own question plus many more to follow.
Servlet: http://en.wikipedia.org/wiki/Java_Servlet
Filter: http://www.oracle.com/technetwork/java/filters-137243.html -
Difference between servlet and ActionServlet
Difference between servlet and ActionServlet..
Anybody replyjsf_VWP5.5.1 wrote:
Difference between servlet and ActionServlet..
Anybody replyAs their name imply, ActionServlets like outdoor activities, whereas Servlets are rather contemplative types.
The only time Servlets exhibit behavior similar to ActionServlets, in under extremely stressful situations, like when a Servlet is being chased by a pit bull. -
Servlet and EJB on different machine: Security propagation
Hi all,
I have an application, where my servlets and EJBS are deployed on the same machine.So
when in my servlet a user need to authenticate himself, security credentials are
propagated to the EJB automatically.I'd like to know in the case where the components
are on different machine if I need to put the credential in my InitialContext
when my servlet calls my EJB or if it is also done automatically.
Cheers
romainSay your stub is in a jar called stub.jar.
You need to put that stub somewhere that it can be reached through a protocol for which Java has a URL type - so you can put it on a shared file system and use a file URL or behind an http server and use an http URL.
Let's use http - put stub.jar at the docroot of a web server.
Then, when you start your SERVER code, include this VM parameter:
-Djava.rmi.server.codebase="http://<serveraddress>stub.jar"
Now your client will be able to use http to load the stub file out of stub.jar through http.
If you do use a file URL, make sure the shared directory you put your jar in is not on the client's classpath. -
JNDI tree access for code outside servlets and EJBs and JSPs
Can code outside EJBs, Servlets and JSPs have access to the JNDI tree?
For example, in a web application, web.xml has a env-entry declaration which I want to access from a POJO which is called by a JSP in the web app. Is this permissible?Can code outside EJBs, Servlets and JSPs have access
to the JNDI tree?
For example, in a web application, web.xml has a
env-entry declaration which I want to access from a
POJO which is called by a JSP in the web app. Is
this permissible?Yes. Read the JNDI tutorial. -
Differences between servlet and backing bean
Could anyone please tell me whether everywhere that servlet can be used, backing bean and JSF can be used too? Are JSF and backing beans the new alternatives for JSP and servlets? please clarify the relations between these concepts for me.
Thanks
LauraLaura_Jlover wrote:
Thank you. You mean backing beans can do every thing that servlets can do? Yes.
JSF pages can work with servlets? Strictly speaking, every JSF page gets passed through the FacesServlet which does all the task. The lifecycle, creating the FacesContext, putting the request parameters in backing beans, rendering the response, etcetera.
what are the advantages of servlet and the advantages of backing beans? what's the disadvantages? In general, which one is better?In context of JSF, you should be using backing beans, not Servlets. There is nothing what a Servlet can offer you as an advantage in the JSF context. It is simply not an option/alternative. You can't even call a Servlet (directly) using a JSF h:form. You, however, can access backing beans in any JSP or Servlet outside the JSF context.
Just carefully read the JSF specification or buy a JSF book and the picture will be clear.
JSF spec: [http://jcp.org/aboutJava/communityprocess/final/jsr252/index.html].
JSF book: [http://www.amazon.com/JavaServer-Faces-Complete-Reference/dp/0072262400]. -
When to Use Servlet only, EJB only and, both Servlet And EJB???
I have a question, If I want to build a Web application. Sometime i found that there is no need to use EJB as Servlet already provide that functionality.
Can anyone tell me when do I use Pure Servlet? When do I use Pure EJB and, When do I use Both EJB and Servlet???
I am very interesting in it.
Thanks.
JackEJB and servlets are two different things. Trying to compare them doesn't really make sense. A web application is always going to need some way to process Http requests and this in Java is done accomplished through Servlets (or jsp pages which in turn also use servlets).
EJBs are the basis of distributed cross-platform objects. They are handled through name services and stored in databases. An Entity Bean can be "brought back to life" as long as it's info is stored in a database. Regardless of a server being restarted. All this database support behind an Entity Bean (transactions, queries etc.) are very transparent to the programmer. They are provided by the EJB vendor.
The class properties of a Servlet (or class-level member variables) are shared among all requests (running thread instances of the service method). That's why they should be used with a lot of caution. This feature can be very useful but if used improperly can also be very vulnerable to security and synchronization issues.
I'm not an EJB expert but this explanation should give you some idea of what EJBs are all about. -
Share Configuration Manager Entries between WebDynpro and EJB
Hi there,
I have an annoying problem: I would like to have a WebDynpro as full-blown configuration interface for my EJBs. As steted in the docu, it is not possible to share configurations between applications.
With EJB and Web Modules I would just place them in the same Enterprise Application. But I cannot as WebDynpro projects to enterprise applications (as far as I know).
Does anyone have a clou about I could manage this issue?
Thanks!
helgeHi Maksim,
at the link you've provided it is described how to use the Configuration Manager within an EJB Module.
My Problem is that I want to use it from an WebDynpro Application. But there I don't have a META-INF\application-j2ee-engine.xm to configure the dependency.
This itself is not a problem since you can also access the Configuration Manager via JNDI.
My problem now is that the EJB Module (more precise the enterprise application where the EJB Module is included) needs to share the configurtion with the Dynpro. But vi JNDI you only get the ApplicationConfigurationManager - which is application specific.
So the question is how I could share the configuration between WebDynpro and EjbModule...
Regards,
helge -
Shared classes between webapplication and ejb
Hello,
If I have some java classes that are used by both WebApplication and EJB, do
I have to include those classes into both war and jar files?
Regards,
PeterYes accorinding to WLS Documentation
--Naggi
"Programming today is a race between software engineers
striving to build bigger and better idiot-proof programs, and the universe
trying to build bigger and better idiots.
So far, the universe is winning."
"Peter Tsang" <[email protected]> wrote in message
news:[email protected]..
>
Hello,
If I have some java classes that are used by both WebApplication and EJB,do
I have to include those classes into both war and jar files?
Regards,
Peter -
Servlet jndi lookup to remote EJB, servlet and EJB not in the same application
Hi,
I think that the subject explain my problem.
I have Oracle IAS9i 9.0.2.0.0, and JDeveloper 9.0.2.829
I have deployed and EJB in IAS9i and i want to use from the developer machines, which have JDeveloper.
how can i to do remote calls from JDeveloper?.
I have modifed the orion-application.xml, and added remote=true.
I have modifed the rmi.xml and added the hosts where the Jdeveloper placed.
Any ideas?
Thanks and cheers
P.D The app server and jdeveloper are in the same net.
if it is posible replys me to [email protected] too.Steps to access a remote EJB from within OC4J
++++++++++++++++++++++++++++++++++++++++++++++
1) Deploy EJB application (ApplicationRemote) to remote container (REMOTE)
"java -jar admin.jar -deploy ormi://REMOTE.hostname:REMOTE.port REMOTE.username REMOTE.password -deploy -file ApplicationRemote.ear
-deploymentName ApplicationRemote"
2) Ensure that local application (ApplicationLocal) has ejb-ref tags for remote EJBs accessed (in web.xml or ejb-jar.xml)
3) Deploy to local container (LOCAL) an empty application (ApplicationEmpty) with the same name as the remote application (ApplicationRemote)
"java -jar admin.jar -deploy ormi://LOCAL.hostname:LOCAL.port LOCAL.username LOCAL.password -deploy -file ApplicationEmpty.ear -deploymentName
ApplicationRemote"
5) Deploy local application (ApplicationLocal) to local container (LOCAL)
"java -jar admin.jar -deploy ormi://LOCAL.hostname:LOCAL.port LOCAL.username LOCAL.password -deploy -file ApplicationLocal.ear -deploymentName
ApplicationLocal"
4)Restart local container
ApplicationEmpty should consist of just an application.xml file - no modules. The same file can be deployed with different application names for all the remote
applications that must be accessed.
ApplicationLocal should access the remote EJB by using the following JNDI properties
java.naming.factory.initial = "com.evermind.server.rmi.RMIInitialContextFactory"
java.naming.provider.url = "ormi://REMOTE.hostname:REMOTE.port/ApplicationRemote"
java.naming.security.principal = "REMOTE.username"
java.naming.security.credentials = "REMOTE.password"
regards
Debu Panda -
Login pattern between Web and EJB
Hi everyone,
I'm looking for the best pattern to setup my web login system.
(Login page in JSP-JSF and then user right).
I know the J2EE pattern for communication between presentation and business tier as such as Business Delegate, Session Facade, Application Service, ...
But,
How do i have to implement to login check in my session bean ?
How is keept the information about the current user (webSession or statefull bean) ?
Anyway, is anyone can give me an exmaple of a typical implementation.
Thank.Check out the InterceptingFilter pattern.
That's the way to check if the user is logged into the system.
But, i also would like to know, the best way to login the user,
The action to do when the user submit the login page.
One current practice is to store an object in the sessionScope of the Web presentation tier (for web, in my case) .
So, i think about one way :
I've got an entity Bean which represent the User Access for the application so that any kind of client use the same User Access.
Can i write a method in my SessionBean (SessionFacade pattern) to get the
transfert object representing the User an store this transfert object into the sesionScope ?
(So, if the return is null, that's wrong login ).
My SessionFacade would have an method like the following :
public UserTo loginUser (String login, String password) throws RemoteException {
} Thank's -
Passing objects between Servlets and JSP
Hi,
I have passed a ResultSet from a Servlet to JSP using RequestDispatcher forward(). I can access the ResultSet in the JSP page. How can I now pass this ResultSet into another JSP page once the form has been submitted?
Thanks in advance.You should never passing expensive resources like ResultSet around like that. This indicate an open DB connection somewhere while it should already be closed at this stage.
Read on about the DAO pattern and make use of servlets and beans. -
What is relationship between javabeans and Ejb ?
I am new to javabeans and Ejb .
thanks in advance.
zzl_hz_cnnada. null. nil. void. zero. zilch.
-
Hi,
My question, is possible to access from servlet some EJB through EJB's local interface, even these participate two different containers?
Regards
KrzysztofI am not that good with EJB , but I donot think so
EJB Local interfaces only work from othe EJB's AFAIK,
Maybe you are looking for
-
ITunes Match sometimes skips / plays songs with exclamation marks
Using iTunes Match (v10.5.3) from my MacBook (OS X 10.6.8) I synched about 60G of music located on an external hard drive connected to my home-based AirPort Extreme base station into Apple's cloud. It works great from my iPhone and the iMac in my rem
-
Fan problem with NX6800GT TD256
The NX6800GT has a sliding fan controller to adjust the fan speeds. When I try to turn the fan all the way down, there is a really annoying high pitched whine. It goes away when I turn the fan up, but then it is too load. Is this whine normal and doe
-
I recently changed my plan to the photoshop plan which includes photoshop and Lightroom but LR won't let me go into the Develop Module or the other Modules because it says Develop Module is disabled. Please renew your membership to reactivate. I'm st
-
Hello All, I intend to get the actual AR invoice value on the AR credit note. This is considering that I am not creating the credit note to the full value of the invoice. I would essentially like to show the actual AR INvoice value, the correct value
-
Connecting Via COM with Indesign CC Server
Hi We are currently using Adobe CS5 Server - and connecting to it VIA COM. We are looking to upgrade to Indesign CC Server - but we want to know if we can still connect to it via COM ? Best Regards Martin