What is an EJB client?
From EJB tutorial http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/EJBConcepts2.html#62895
Second, because the beans--and not the clients--contain the application's business logic, the client developer can focus on the presentation of the client. The client developer does not have to code the routines that implement business rules or access databases. As a result, the clients are thinner, a benefit that is particularly important for clients that run on small devices.
What does it mean by 'client' in the above paragraph?
I agree and I understand what's the point with
separation of the layers, Kumar.
But how does it help small devices?
Is the EJB tutorial wrong? Are you agree/disagree
with the paragraph from the tutorial re it helps
small devices, and why?If you are developing an application for small devices certainly you cannot do much processing as the recources are limited, so place a request to your server which does it for you. Also if you have any idea of developing enterprise application for multiple clients (Swing, Jsps, Mobile etc) only your presentation needs to be implemented but not the business.
Similar Messages
-
Basic question: what to provide EJB client
Weblogic 6.1, SP1, on Red Hat Linux and Windows 2000
I have been developing an application for a few months now, but all EJBs have
only had local interfaces. My team now needs to expose a few remote interfaces
to another division of my company that's using WLS on another server. I understand
the changes that I need to make on the server side. I have searched the documentation
several times for help, but I can't seem to find a "Start here" page on how to
create the client Jar.
My understanding is this so far. For the server that will contain and run the
beans, I still bundle up the MyServiceBean, MyServiceRemote, and MyServiceHome
class files into a jar and run ejbc to perform the EJB compiling. My Manifest's
Class-Path element references some helper Jars like exceptions and value objects.
Once that's done, I then create a separate jar for the client. I must modify
my ejb-jar.xml file to add an ejb-client-jar element with MyServiceClient.jar
(or whatever the final file name will be) as its value. The client jar should
otherwise contain the same classes as the server jar, but without the bean class.
And then I also just provide the helper jars as well.
I'm sure I don't have this right yet, and I'd really appreciate some insight.
But then I have a more fundamental question: how does the client know which server
contains my EJBs? I haven't found this info in any deployment descriptor. The
only guess I have so far is that when the client creates an InitialContext to
fetch the home interface, they have to specify a ProviderUrl with my server's
IP address when they create an Environment.
Any help would be greatly appreciated. Thanks so much.
AndyYou don't really need to put an entry for ejb-client-jar element in the
ejb-jar.xml. You can still create your client and run it. Only thing is that
you need to put ur client jar in the classpath of your java client.
Hey Seth, where exactly is the ejb-client-jar entry is used ? I mean without
this also you can run ur client. Where does this help?
Rupesh.
Andrew Byala <[email protected]> wrote in message
news:[email protected]...
>
Hey, thanks for the rapid reply, Seth. But I'm wondering about theejb-client-jar
element of the ejb-jar.xml file. It seems a bit silly to use the xml filein
one version to generate my server-side Jar, and then have to make anotherversion
to generate the client-side Jar. Is there a simple way to do this withoutwriting
custom Ant tasks or anything like that?
Seth White <[email protected]> wrote:
Andrew Byala wrote:
Weblogic 6.1, SP1, on Red Hat Linux and Windows 2000
I have been developing an application for a few months now, but allEJBs have
only had local interfaces. My team now needs to expose a few remoteinterfaces
to another division of my company that's using WLS on another server.I understand
the changes that I need to make on the server side. I have searchedthe documentation
several times for help, but I can't seem to find a "Start here" pageon how to
create the client Jar.
My understanding is this so far. For the server that will containand run the
beans, I still bundle up the MyServiceBean, MyServiceRemote, and
MyServiceHome
class files into a jar and run ejbc to perform the EJB compiling.My Manifest's
Class-Path element references some helper Jars like exceptions andvalue objects.
Once that's done, I then create a separate jar for the client. I mustmodify
my ejb-jar.xml file to add an ejb-client-jar element with
MyServiceClient.jar
(or whatever the final file name will be) as its value. The clientjar should
otherwise contain the same classes as the server jar, but without thebean class.
And then I also just provide the helper jars as well.
I'm sure I don't have this right yet, and I'd really appreciate someinsight.
Sounds like you've got it, actually. The client just needs to have the
remote interface
classes
for the bean + helper classes in its classpath. Any generated RMIclasses
will be loaded
over the network, if needed.
But then I have a more fundamental question: how does the client knowwhich server
contains my EJBs? I haven't found this info in any deployment
descriptor.
The
only guess I have so far is that when the client creates an
InitialContext
to
fetch the home interface, they have to specify a ProviderUrl with myserver's
IP address when they create an Environment.To the best of my knowledge, this is correct as well.
Any help would be greatly appreciated. Thanks so much.
Andy -
What is an EJB client session? How many are there? When does it start and when does it end? Who controls that?
Thank you.You may be thinking of a Stateful Session Bean. Each stateful session bean has state that is tied to a
particular client. In EJB 3.0, the stateful session bean is created when the client does a naming
lookup or has the stateful session bean injected. The client can remove the stateful session bean at
any time by calling a method annotated with the @Remove annotation.
The container can also choose to remove a stateful session bean. Typically, the container vendor
provides configuration options that specify the stateful session bean timeout parameters.
--ken -
How can I run EJB Client in other computer ?
Hello,
I'm trying to run converter examples.
if ejb client pgm resides on a same machine with j2ee server , it works fine.
But when I put client pgm on a different maching
below message show.
No application client descriptors defined for: ConverterClinet
I put ConverterApp.ear, ConverterAppClient.jar and ConverterClient.class on the machine and
set APPCPATH=ConverterAppClient.jar
set VMARGS=-Dorg.omg.CORBA.ORBInitialHost=xxx.xxx.xx.xx
What should I do to run ejb client on different machine?Hi SangHPark,
I had the same problem but have solved it and it works.
I ran the client remotely from a win98 box.
Keep two things in mind
1> Deploy the applications to an ip address and not to the local host using the deploy too. Use the deploy tool Gui to add a new server and then deploy the application to this ip address.
2> I am running j2ee version 1.3 and jsdk 1.3
Use the following code but instead of using "java:comp/env/ejb/SimpleConverter" use the jndi name of the object: "MyConverter" as specified in the tutorial.
Properties prop = new Properties();
prop.setProperty(Context.INITIAL_CONTEXT_FACTORY,"com.sun.enterprise.naming.SerialInitContextFactory");
prop.setProperty(Context.PROVIDER_URL,"IIOP://xxx.xx.x.xxx:1050");
System.out.println("Attempting to create context...");
Context initial = new InitialContext(prop);
// Instead of this use the below line of code
//Object objref = initial.lookup("java:comp/env/ejb/SimpleConverter");
Object objref = initial.lookup("MyConverter");
// MyConverter is the Jndi name of the ConverterBean as per the tutorial
You need to do the following things.
1> After making changes to the code recompile using Ant and redeploy it.
2> Copy the j2ee.jar, ConverterAppClient.jar and ConverterClient.class file to the machine that u want to run the client from.
3> create a directory called "config" on the remote machine where you copied the files in step two.
4> Copy to this directory the files ejb.properties and security.properties from your j2ee_home\config\ directory.
For example you copied the files in step 2 on the remote machine in the c:\test directory. Create c:\test\config directory and copy the files from step 4 into this directory.
5> Run the following command from the directory where u copied the client files
java -Dorg.omg.CORBA.ORBInitialHost="host name" -classpath .\j2ee.jar;.;.\ConverterAppClient.jar ConverterClient
Monal -
Hi, I use jdev 10g. I created a session bean with wizards and after that I created I Ejb client for that bean. When I start the embedded server and run the client java file I get the following error :
com.evermind.server.rmi.OrionRemoteException: jazn.com/admin is not allowed to call this EJB method, check your security settings (method-permission in ejb-jar.xml and security-role-mapping in orion-application.xml).
at denemeSessionHome_StatelessSessionHomeWrapper1.create(denemeSessionHome_StatelessSessionHomeWrapper1.java:41)
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:324)
at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:124)
at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:48)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
at java.lang.Thread.run(Thread.java:534)
at connection to localhost/127.0.0.1 as admin
at com.evermind.server.rmi.RMIConnection.EXCEPTION_ORIGINATES_FROM_THE_REMOTE_SERVER(RMIConnection.java:1527)
at com.evermind.server.rmi.RMIConnection.invokeMethod(RMIConnection.java:1480)
at com.evermind.server.rmi.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:55)
at com.evermind.server.rmi.RecoverableRemoteInvocationHandler.invoke(RecoverableRemoteInvocationHandler.java:22)
at __Proxy0.create(Unknown Source)
at ejbpackage.denemeSessionClient.main(denemeSessionClient.java:21)
Process exited with exit code 0.
all settings are the default ones.
Anyone has any idea???hi
There was no problem with that... the AdviceClient is not in the package... I needed j2ee.jar and AdviceAppClient.jar to run the client and hte AdviceClient is in C\java\Projects\Advice directory.... can anyone help me with what is wrong with my first command which didnt work ...
java -classpath c:\Sun\AppServer\lib\j2ee.jar;c:\java\Projects\Advice;c:\java\Projects\AdviceAppClient.jar AdviceClient
This one worked though....
java -cp {$CLASSPATH}:"C:\java\Projects\Advice";AdviceAppClient.jar;c:\Sun\AppServer\lib\j2ee.jar; AdviceClient
I dont know what makes the difference...
vidhya -
Hi,
I've got an EJB system that until now have been packaging as just a
bean jar and not bothering with a ejb-client.jar. I now want to
package as follows
a). A bean EAR file (containing bean jar, and dependency jars) - for
deploying on EJB server.
b). An app EAR file (containing WAR, containing ejb-client.jar).
The first part is done. The second raised questions about the contents
of the ejb-client.jar. I have packaged the Home/Remote interfaces and
all necessary utility classes (i.e omitting the Local/LocalHome/EJB
classes). What I need to know is what goes in there in terms of
descriptors.
Do I just package the exact same ejb-jar.xml, jboss.xml,
jbosscmp-jdbc.xml, weblogic-ejb-jar.xml, weblogic-cmp-rdbms-jar.xml ?
or do I have to change these in some way ?
Do I also add the ejb-client-jar tag to the ejb-jar.xml ? (would this
also go in the ejb-jar.xml that goes in the bean jar ?) ... and indeed
what would I put in there ... just the name of ejb-client-jar file
even though its only being packaged into any application WAR (what
purpose does it serve) ?
TIAThe ejb-link value should include pathnames relative to the top level of the EAR
file.
<ejb-link>../my_beans-client.jar#CurrencyExchange</ejb-link>
Andy Jefferson <[email protected]> wrote:
Deepak Vohra wrote:
An ejb-client.jar contains the class files, the home and remote interfaces
and the primary key class, a client program needs to call the EJBs
contained in the ejb-jar file.
Also, ejb-client.jar contains a copy of any classes from the ejb-jarfile
that
are referenced by the home and remote interfaces and the primary key
class. Deployment descriptors are not required in the ejb-client.jar.
ejb-client-jar element is not a required element in ejb-jar.xml. If
ejb-client-jar.xml is specified in ejb-jar.xml ejbc generates the
ejb-clent.jar file.
Thx. I'm not interested in using any server-specific tools (like ejbc)
since
I'm deploying to multiple servers and so am generating the ejb-client
jar
myself in my build process. In this context, what purpose does the
<ejb-client-jar> tag in the ejb-jar.xml descriptor have ? Why does the
beans jar need to know anything about where the client stubs are ?
As far as I can tell I'm including the right things in my ejb-client.jar,
and I've tried deploying my web-app EAR to WebLogic 7.0 and I always
get
that it can't find the ejb-link elements. What i've got in my EAR is
my_app.war
META-INF/application.xml
and in the WAR
my JSP files
WEB-INF/web.xml
WEB-INF/jboss-web.xml
lib/my_beans-client.jar
In the WEB-INF I have ejb-ref's like the following
<ejb-ref >
<ejb-ref-name>ejb/CurrencyExchangeHome</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>my_domain.CurrencyExchangeHome</home>
<remote>my_domain.CurrencyExchangeRemote</remote>
<ejb-link>my_beans-client.jar#CurrencyExchange</ejb-link>
</ejb-ref>
Should I be putting the my_beans-client.jar in the EAR and not the WAR
Seems I am missing something, but not sure what exactly. -
ClassCastException exception while running EJB Client
Folks,
I am getting following exception while running the EJB Client.. I am
using WLS 5.1
Exception in thread "main" java.lang.ClassCastException
at
javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:319)
at FirstStatelessEJBClient.Client.lookupHome(Client.java:149)
at FirstStatelessEJBClient.Client.<init>(Client.java:44)
at FirstStatelessEJBClient.Client.main(Client.java:82)
Can anybody throw a light on this.
Thanks
AshishHi Eduardo,
Below is my classpath. The stubs are in first_statlessSession.jar file.
CLASSPATH=C:\weblogic\myserver\first_statelessSession.jar;
C:\jdk1.2.2\lib\tools.jar;C:\weblogic\license;C:\weblogic\classes;C:\weblogi
c\lib\weblogicaux.jar;
C:\weblogic\myserver\clientclasses;C:\weblogic\myserver\serverclasses
Also, I am just compiling and deploying the
C:\weblogic\examples\ejb\basic\statelessSession myself and testing it. I
am
using the build.cmd files to compile and deploy the above EJB. If I use the
jars provided by weblogic it works fine with same above classpath.
I don't know what to do next. I have invested the whole day to solve this
problem and couldn't.
Please let me know if I am doing anything wrong.
Appreciate your help.
Thanks,
Ashish
Eduardo Ceballos wrote:
Try putting the stubs into the client class path.
"Ashish N. Shah" wrote:
Folks,
I am getting following exception while running the EJB Client.. I am
using WLS 5.1
Exception in thread "main" java.lang.ClassCastException
at
javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:319)
at FirstStatelessEJBClient.Client.lookupHome(Client.java:149)
at FirstStatelessEJBClient.Client.<init>(Client.java:44)
at FirstStatelessEJBClient.Client.main(Client.java:82)
Can anybody throw a light on this.
Thanks
Ashish -
EJB Client JAR project produces empty JAR
I've built an EJB module in WorkSpace Studio using the "WebLogic EJB Project" type, which is part of an EAR. I created a couple stateless session beans within this project, and then created an EJB Client JAR project using the "EJB Client JAR-->Create EJB Client Jar" menu item on the EJB project's hidden menu.
According to the documentation, exporting an EAR file from the EAR project will cause the client JAR to be generated. I exported the EAR file from the EAR project, and sure enough, it included the client JAR (in /APP-INF/lib/). I extracted the client JAR from the EAR and opened it up to make sure it contained all of the client-side classes. I discovered that the client JAR was empty, the only contents being the MANIFEST.MF file. The interface classes were instead contained in the EJB JAR itself.
How can I get the EJB client code to actually be included in the EJB client JAR?
Thanks,
EricWell I have tried this with 6.1 and first
1. One would expect the jar name to be the name in the ejb-jar.xml -
ejb-client-jar section
2. It outputs the file XXXEJB_Compiled.jar but it is same size as base jar
this is 6.1 sp3
whats up?
Matthew Shinn wrote:
Hi Sanjay,
There is a bug in the documentation. The client-jar name should never be part of the
ejbc command line. Step 3 below should be something like:
java weblogic.ejbc xxxEJB.jar xxxEJB_Compiled.jar
If you have an ejb-client-jar entry in your ejb-jar.xml, the client jar should be placed
in the directory from which you ran ejbc. Make sure that the classes that you want to be
put in the client-jar are not loaded from the classpath. This is very important or your
client-jar won't be created correctly. The client-jar will only contain classes loaded
from the input jar to ejbc. A bug for the incorrect documentation has already been filed
and should be fixed soon.
- Matt
Sanjay Dwivedi wrote:
Hi,
I am trying to use the
<ejb-client-jar> sub-element of the Sun's <ejb-jar> (EB 2.0 DTD) element of the
ejb-jar.xml to generate the ejb-client.jar. I followed the step as documented
by WebLogic but the files in EJB jars and ejb-client jars are identical. Here
is what I am doing:
1. Build the xxxEJB.jar for my EJB by running the WebLogic.ejbc on the standard
EJB jar file.
2. My ejb-jar.xml file has following line:
<ejb-jar>
<ejb-client-jar>xxxEJBClient.jar</ejb-client-jar>
</ejb-jar>
3. Next I used the following command to generate the ejb-client.jar file
java weblogic.ejbc xxxEJB.jar xxxEJBClient.jar
My xxxEJBClient.jar files consists of exactly same files (with same sizes) as
the xxxEJB.jar file. Only difference is that the xxxEJB.jar file includes generated
java source files for the bean implementation class and home/remote classes.
In my opinion the xxxEJBClient.jar should not contain the EJB implementation classes.
Any experience using the ejb-client-jar for generating the ejb-client.jar?
Thanks,
Sanjay.
[att1.html] -
EJB Client/Resource Injection
Hi,
could anyone explain to me why the field into which an EJB reference in an EJB client can be injected has to be static? I've read the following in the EJB3.0 tutorial (see below), but I don't know what "static context" means exactly. Care to explain, anyone?
Thanks, Michael
Creating a Reference to an Enterprise Bean Instance
"Java EE application clients refer to enterprise bean instances by annotating static fields with the @EJB annotation. The annotated static field represents the enterprise bean's business interface, which will resolve to the session bean instance when the application client container injects the resource references at runtime.
@EJB
private static Converter converter;
The field is static because the client class runs in a static context."The question was about why the field needs to be marked static. mappedName is a separate issue. The reason injected fields/methods in Application Clients need to be marked static is because of the Application Client programming model. It has always been the case that for an Application Client component the developer writes a static void main() method as the entry point, much like a regular Java Client. This means that the Application Client container invokes the application code with a static invocation, i.e. there is no instance of the main class. Injection is only useful if it takes place before the application code runs, so to accomplish that without changing the Application Client programming model, the Java EE platform spec requires that injected fields/methods be marked static.
As for mappedName, it deals with how to map the ejb dependency to the target bean. By default in SUN's implementation, the remote @EJB dependency will map to the global JNDI name formed by taking the fully qualified type of the remote business interface, in this case <packagename>.Converter. That will work as long as the target Remote EJB has that global JNDI name. If the target Remote EJB's global JNDI name were "GlobalJNDIName", then you would need to explicitly assign that to the client's ejb dependency, as this example shows. That can be done either by using the mappedName() attribute or sun-application-client.xml.
--ken -
EJB client connection [RMI/IIOP]
1) Just to test the communication between EJB client and EJB using RMI/IIOP in WLS 9.2, I have created two InitialContexts and I have seen that here are only two InitialContext. But, I can see only a single connection displayed (Monitoring Channels tab for the default [IIOP] channel). Is this expected? Doesn’t is suppose to create two connections?
2) If only one connection is established. What is the way this model will scale up?? I can have multiple calls..right?
3) What is the connection time out works on this? If I have a stub cached. Does that mean my RMI/IIOP connection still be alive?MC Sreeram <> writes:
1) Just to test the communication between EJB client and EJB using RMI/IIOP in WLS 9.2, I have created two InitialContexts and I have seen that here are only two InitialContext. But, I can see only a single connection displayed (Monitoring Channels tab for the default [IIOP] channel). Is this expected? Doesn???t is suppose to create two connections?Connections are share beween the same port and ip addresses.
2) If only one connection is established. What is the way this model will scale up?? I can have multiple calls..right?Yes. It scales up nicely.
3) What is the connection time out works on this? If I have a stub cached. Does that mean my RMI/IIOP connection still be alive?The stub should transparently re-establish the connection if it is timed out
andy -
Java EJB client "Can't connect to ORB" errors...
I'm writing an application that is a Java EJB client application (no web
stuff at all). Needless to say there are no examples of such an app in
the samples dir, they are all web-based.
My problem is that when I try to run my application (client calls a
stateless session bean on the server and gets a "hello world" string
back) I get a "Could not create the TestService bean:
javax.naming.CommunicationException: Cannot connect to ORB [Root
exception is org.omg.CORBA.COMM_FAILURE: minor code: 1 completed:
Maybe]" error.
This is a very simple test, and I'm getting quite frustrated in trying
to figure out what's actually wrong.
Here's the client code (the bean on the server has been deployed into a
module called achptestEjb, the bean name is TestService)
TestService service = null;
TestServiceHome home=null;
String host = "localhost";
String port = "12345";
try {
Properties env = new Properties();
Context context=null;
String jndiName="ejb/achptestEjb/TestService";
System.out.println("JNDI name is "+jndiName);
env.put
("java.naming.factory.initial","com.sun.jndi.cosnaming.CNCtxFactory");
env.put("java.naming.provider.url", "iiop://"+host+":"+port);
context = new InitialContext(env);
The error comes when the new InitialContext is set with the properties
in the env object.
Any ideas what I'm doing wrong?
It would be a BIG help if iPlanet included one simple pure EJB client
example. There are some of us out here who feel HTML is too limiting
for complicated applications.
Douglas BullardI finally found the answer to my problem.... in the Ant script I had
copied from another example, the "-iiop" was lacking in the ejbc
arguments - almost all of the examples assume you'll be calling EJBs
from within the container, instead of a stand-alone client, so they
don't use that flag.
Putting that "-iiop" flag into the ejbc arguments fixed everything.
Thanks, Shivani, for pointing out what is now obvious but was
mysterious.
Douglas Bullard
In article <[email protected]>,
[email protected] says...
I'm writing an application that is a Java EJB client application (no web
stuff at all). Needless to say there are no examples of such an app in
the samples dir, they are all web-based.
My problem is that when I try to run my application (client calls a
stateless session bean on the server and gets a "hello world" string
back) I get a "Could not create the TestService bean:
javax.naming.CommunicationException: Cannot connect to ORB [Root
exception is org.omg.CORBA.COMM_FAILURE: minor code: 1 completed:
Maybe]" error.
This is a very simple test, and I'm getting quite frustrated in trying
to figure out what's actually wrong.
Here's the client code (the bean on the server has been deployed into a
module called achptestEjb, the bean name is TestService)
TestService service = null;
TestServiceHome home=null;
String host = "localhost";
String port = "12345";
try {
Properties env = new Properties();
Context context=null;
String jndiName="ejb/achptestEjb/TestService";
System.out.println("JNDI name is "+jndiName);
env.put
("java.naming.factory.initial","com.sun.jndi.cosnaming.CNCtxFactory");
env.put("java.naming.provider.url", "iiop://"+host+":"+port);
context = new InitialContext(env);
The error comes when the new InitialContext is set with the properties
in the env object.
Any ideas what I'm doing wrong?
It would be a BIG help if iPlanet included one simple pure EJB client
example. There are some of us out here who feel HTML is too limiting
for complicated applications.
Douglas Bullard -
I am getting this problem when running ejb client
Hi,
Any one help me , i am getting this error when i run my ejb Client
D:\sample\Client>
java -Djava.naming.factory.initial=com.sun.jndi.cosnamin
g.CNCtxFactory -Djava.naming.provider.url=iiop://localhost:1050 com.net.ejbexamples.slsb.EJBClient
Exception in thread "main" org.omg.CORBA.COMM_FAILURE: minor code: 1398079490
completed: No
at com.sun.corba.se.internal.iiop.IIOPConnection.writeLock(IIOPConnectio
n.java:956)
at com.sun.corba.se.internal.iiop.IIOPConnection.send(IIOPConnection.jav
a:1017)
at com.sun.corba.se.internal.iiop.IIOPOutputStream.invoke(IIOPOutputStre
am.java:71)
at com.sun.corba.se.internal.iiop.ClientRequestImpl.invoke(ClientRequest
Impl.java:82)
at com.sun.corba.se.internal.corba.ClientDelegate.invoke(ClientDelegate.
java:153)
at com.sun.corba.se.internal.corba.InitialNamingClient.resolve(InitialNa
mingClient.java:195)
at com.sun.corba.se.internal.corba.InitialNamingClient.cachedInitialRefe
rences(InitialNamingClient.java:260)
at com.sun.corba.se.internal.corba.InitialNamingClient.resolve_initial_r
eferences(InitialNamingClient.java:183)
at com.sun.corba.se.internal.corba.ORB.resolve_initial_references(ORB.ja
va:1465)
at weblogic.iiop.IORManager.createInitialReference(IORManager.java:113)
at weblogic.corba.j2ee.naming.InitialContextFactoryImpl.getInitialContex
t(InitialContextFactoryImpl.java:96)
at weblogic.corba.j2ee.naming.InitialContextFactoryImpl.getInitialContex
t(InitialContextFactoryImpl.java:86)
at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialCont
extFactory.java:149)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6
60)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:241
at javax.naming.InitialContext.init(InitialContext.java:217)
at javax.naming.InitialContext.<init>(InitialContext.java:193)
at com.net.ejbexamples.slsb.EJBClient.main(EJBClient.java:15)
ThanksFound in negative cache.... very strange.
RFC found in negative cache
What is the negative cache? -
The server deploy EJB but I run EJB Client program,The error msg is can't find JNDI
Hi all:
I am using Weblogic 6.1/SP2. I use the console to start
server and deploy EJB jar,from the msg I see my EJB jar
been deployed. When I run EJB Client program, the error
msg is can't find JNDI name t3://URL:11003.....
I check my ejb-jar.xml amd weblogic-ejb-jar.xml are fine.
Last week I did deploy EJB and ran the client both
suceessful. Any ideas, Thank you.Sabha:
Thank you for your help info, I soloved the problem.
The problem is the ejb jar was deleted(I don't why)
then System Admin to deploy EJB jar from Admin console.
After that everything is fine.
"Sabha" <[email protected]> wrote:
Run weblogic.Admin -url ... LIST to see whether the JNDI name is there
. or
you can view the jndi tree of the server from the console (right click
on
server name) and check whether the ejb home is bound to the correct jndi
name.
-Sabha
"Matthew Shinn" <[email protected]> wrote in message
news:[email protected]..
Hi Albert,
I would double check to make sure the EJB was indeed deployed (check
server log). What message did you see that leads you to believe itwas
successfully deployed? Also, verify the JNDI name you are lookingup in
your client matches the JNDI name for the EJB. If this doesn't solve
the problem, please post the error message and stack trace you are
seeing on the client.
- Matt
Albert Pi wrote:
Hi all:
I am using Weblogic 6.1/SP2. I use the console to start
server and deploy EJB jar,from the msg I see my EJB jar
been deployed. When I run EJB Client program, the error
msg is can't find JNDI name t3://URL:11003.....
I check my ejb-jar.xml amd weblogic-ejb-jar.xml are fine.
Last week I did deploy EJB and ran the client both
suceessful. Any ideas, Thank you. -
What role can ejb Session Beans play jsp session tracking
I am also looking for a way to use JSP as ejb client with WLS5.1. i would appreciate any help.
-Girish
Prasad Peddada <[email protected]> wrote:
>David,
> The beans which are refered in jsp specs are java beans and not EJB.
>
>Prasad
>
>David Levy wrote:
>>
>> Hello,
>>
>> We are using Jsp/Servlets which will hold session state and subsequently
>> call ejb Session Beans for transaction/persistence coordination . We are
>> not sure if we are using the correct techniques to control object memory.
>>
>> Summary of what we have:
>>
>> A jsp with the "useBean" directive:
>> <jsp:useBean id="MySession" class="com....MySession"
>> scope="session"></jsp:useBean>
>>
>> The class MySession holds other classes ( all serializable).
>> The class MySession is NOT an ejb Session Bean
>>
>> Questions:
>> We are considering making class MySession an ejb Session Bean so (via it's
>> passivate/activate feature) we can control instances in memory as more web
>> clients start the session from the jsp page. I.E. all web clients will have
>> their own HttpSession instance which holds on to an ejb Session Bean object
>> "MySession"( or a passivated representation of it)
>>
>> 1) Is this a sufficient approach or will there be other memory concerns?
>> I.E. What about all the HttpSession objects out there? Do they need to be
>> passivated as well?
>>
>> 2) If its a good idea to passivate the HttpSessions as well, then what
>> mechanism should be used ( servlet session persistence)? Also, if we are
>> passivating the HttpSession (which holds on to the MySession object graph)
>> , then why bother with the SessionBean for passivation
>>
>> 3) Currently, we only have a single instance of a servlet handling all
>> requests. Will multiple instances buy us anything?
>>
>> 4) How does clustering relate to this topic?
>>
>> 5) Can we change the "jsp:useBean" directive so MySession is an ejb Session
>> Bean or do we have to do the "home.create()" within a jsp script?
>>
>> thanks,
>> dave
-
Can an EJB client application access to EJBs on two domains concurrently?
It is well-known that there can be multiple domains in a SUN application server. If two domains are started up, can the same EJB client application call different EJB methods from the two domains? If can, how to implement? Please kindly give a snippet of sample codes.
Another question: can EJBs among multiple domains communicate with each other? If can, tell me how to implement and had better provide some sample codes as well.I have my client working now!
I was looking around on other forums and found a guy who said that javax.comm has problems with security. here is the address
http://lists.dalsemi.com/maillists/java-powered-ibutton/2002-February/002168.html
He said,
"This is an error generated by the javax.comm packages when initializing
the
serial ports. It's basically a security related bug. Officially, all
packages stored in your lib/ext folder should be considered trusted
code,
running with the same permissions as your trusted main application. But
it
seems that isn't the case with comm.jar.
I've heard that signing the comm.jar file might fix it, but I wasn't
able to
verify that myself (but I didn't test with Netscape's java plugin). I
found
a workaround that should take care of it (as long as your main
application
has "all-permissions"). Try adding this line to the top of your main
method:
System.setSecurityManager(null);
So I did that and it worked except for one thing. at the end of my program the client tells me
The system cannot find the path specified.
Do you think this is a major problem? What is it trying to find??
Michael B
Maybe you are looking for
-
How do I put skype icon back in the dock?
How do I put skype icon back in the dock?
-
Delimiter/Marker inside ddl
Hi I am using DBMS_METADATA to dump the ddl of database objects into a variables using JDBC. I need to seperate each block so that there is a delimiter/marker after every column, constraint, indexe etc inside ddl. Looking for some sugesstions on how
-
Photoshop CC Ground Plane grid spacing/density settings?
I was working with some extruded text (just learning 3D aspects of PS) and it appeared that my ground plane disappeared. So while I can see the extruded text and manipulate it and the camera as expected (normally) the ground plane appears to not be t
-
Cross Domain Web App Authentication
I have two web apps that are running within different domains. They both use j_security for authentication. Is it possible to link from one web app to the other without requiring the user to reauthenticate? I tried setting the security credential to
-
When installing the management agent on a Windows 2000 System, I get the following error (Status = Fail) (Reason = Fail to start service), and it seems there is nothing installed on the 2000 server. Any ideas? With regards, Rocco van der Veer