Wierd functionality of OC4J with BMP EJB....Crazy or is this supposed to happen?
Hi. I'm in a class developing a BMP Entity EJB. I deployed the
bean, whose functionality does simple insert, update, delete
from one table. I created a test client to run from the command
line which works for the create (it inserts a row into the
database). I run SQLPLUS to confirm this.
I then go in to the database through SQL PLUS and delete the row
and commit.
Then I RERUN the test client and the application gives me an
javax.ejb.DuplicateKeyException . Should this happen? When I
look in the database, the ejbCreate is called because the row is
inserted back in, so that much works, but for some reason the
exception is called. Anybody have an idea?
Thanks - Matt
Figured it out thanx to the instructor. Apparently OC4J sets an
EJB setting in the orion-ejb-jar.xml file.
Under <entity-deployment>,
you need to set exclusive-write-access = "false"
The current default is "true"
The default of "true" basically assumes the EJB is the only way
to access the data in the database, so it gives better
performance since data is cached. However, if your application
is used in a distributed environment where you have other
applications working with the data (i.e. Developer App, or
SQLPLUS), then you will want to set this field to "false".
Similar Messages
-
Sometimes when I click on an unread email through Yahoo the message will not appear in the space it is supposed to appear in Yahoo's email program. I have to go back and click on the unread email many times before it will appear. This does not happen if I use Safari. Why does this happen in Firefox 3.6.13. It never happened in earlier versions?
hello, this sounds like an issue with adware present on your pc. please perform all these steps:
# [[Reset Firefox – easily fix most problems|reset firefox]] (this will keep your bookmarks and passwords)
# afterwards go to the firefox menu ≡ > addons > extensions and in case there are still extensions listed there, disable them.
# finally run a full scan of your system with different security tools like the [http://www.malwarebytes.org/products/malwarebytes_free free version of malwarebytes] and [http://www.bleepingcomputer.com/download/adwcleaner/ adwcleaner] to make sure that adware isn't present in other places of your system as well.
[[Troubleshoot Firefox issues caused by malware]] -
Has anyone had this problem? Any solution(s) welcome!
Thanks for the info. I'll have to check this later this evening, since I'm in my office presently.
However, I do think it is (was) indexing. -
my copy and post functions are not working, does any one know why this may be happening and what I could do to fix it? Thanks!
Have you tried rebooting?
-
OC4J with EJB 2.1 release date?
Is there any release date available for the OC4J with EJB 2.1 support?
Hello Haug,
it's planned for summer 2005. -
Compilation errors with CMP EJBs in OC4J
I have created several new EJB's in JDeveloper using the
EJB creation wizard. For most of them I chose the CMP Entity Beans from Tables wizard. Now I have already created some EJB's this way and have used them successfully. But for some reason when I try to start my OC4J, I get the following error messages for all my new EJB's:
Error creating table: java.sql.SQLException: ORA-00955: name is already used by an existing object
Why is this?The out-of-the-box behaviour of OC4J is to try to create tables for CMP beans when they are deployed. It sounds like a redeployment may be occuring bwhen you restart OC4J which is causing it to try and create the tables.
I think that even though you see these error messages, the container will start and your beans will function.
You can do one of two things to alter this situation if you want
a) manually drop the tables from the db before you do the next deployment
b) set the default behaviour of OC4J to drop tables when an application is undeployed (which happens before a redeployment is done) -- this can be done by setting an additional attribute on the j2ee/home/config/application.xml file -- "autodelete-tables=true"
-steve- -
Problem with Stateful EJB in JBOSS
Hi,
J have a problem with invoking stateful EJB methods from my web application deployed in Jboss 4.0.5.GA both. The same EJB with WebLogic functions perfectly, instead with Jboss it often throws the following exception:
ERROR [org.jboss.ejb.plugins.LogInterceptor]
EJBException in method: public abstract java.lang.String
infrastruttura.server.ejb.sessionproxy.SessionProxy.getCodiceGruppo() throws
java.rmi.RemoteException:
javax.ejb.EJBException: Application Error: tried to enter Stateful bean with
different tx context, contextTx: TransactionImpl:XidImpl[FormatId=257,
GlobalId=pitjb01/305, BranchQual=, localId=305], methodTx:
TransactionImpl:XidImpl[FormatId=257, GlobalId=pitjb01/306, BranchQual=,
localId=306]
at
org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessionInstanceInterceptor.java:283)
at
org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
at
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
at
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
at
org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:136)
at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:648)
at org.jboss.ejb.Container.invoke(Container.java:954)
at sun.reflect.GeneratedMethodAccessor79.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at
org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:169)
at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:118)
at org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:209)
at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:195)
at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:61)
at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:70)
at
org.jboss.proxy.ejb.StatefulSessionInterceptor.invoke(StatefulSessionInterceptor.java:121)
at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100)
at $Proxy83.getCodiceGruppo(Unknown Source)
at org.apache.jsp.jsp.main_jsp._jspService(main_jsp.java:117)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)
at
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
2008-02-27 20:19:54,458 ERROR
[org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[PitagoraOlo].[jsp]]
Servlet.service() for servlet jsp threw exception
java.rmi.ServerException: EJBException:; nested exception is:
javax.ejb.EJBException: Application Error: tried to enter Stateful bean with
different tx context, contextTx: TransactionImpl:XidImpl[FormatId=257,
GlobalId=pitjb01/305, BranchQual=, localId=305], methodTx:
TransactionImpl:XidImpl[FormatId=257, GlobalId=pitjb01/306, BranchQual=,
localId=306]
at org.jboss.ejb.plugins.LogInterceptor.handleException(LogInterceptor.java:365)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:209)
at
org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:136)
at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:648)
at org.jboss.ejb.Container.invoke(Container.java:954)
at sun.reflect.GeneratedMethodAccessor79.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at
org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:169)
at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:118)
at org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:209)
at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:195)
at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:61)
at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:70)
at
org.jboss.proxy.ejb.StatefulSessionInterceptor.invoke(StatefulSessionInterceptor.java:121)
at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100)
at $Proxy83.getCodiceGruppo(Unknown Source)
at org.apache.jsp.jsp.main_jsp._jspService(main_jsp.java:117)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)
at
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
Caused by: javax.ejb.EJBException: Application Error: tried to enter Stateful
bean with different tx context, contextTx: TransactionImpl:XidImpl[FormatId=257,
GlobalId=pitjb01/305, BranchQual=, localId=305], methodTx:
TransactionImpl:XidImpl[FormatId=257, GlobalId=pitjb01/306, BranchQual=,
localId=306]
at
org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessionInstanceInterceptor.java:283)
at
org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
at
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
at
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
... 47 more
Is there someone can help me?
thanks forward.We got resolved it through bea. This is a know problem of WLS6.1 Sp4. Bea has provided
us with a patch, after which every thing seems to be working fine.
Please open a case with bea mentioning the CR092146. You can read the description
of this CR on internet.
This will certainly solve your problem.
Bob Butkus <[email protected]> wrote:
>We are experiencing the same issue. Did you ever get this resolved?
-
Hi,
I have a question on using EJB / or RMI servers with CORBA clients using
RMI-IIOP transport, which in theory should work, but in practice has few
glitches.
Basically, I have implemented a very simple server, StockTreader, which
looks up for a symbol and returns a 'Stock' object. In the first example, I
simplified the 'Stock' object to be a mere java.lang.String, so that lookup
would simply return the 'synbol'.
Then I have implemented the above, as an RMI-IIOP server (case 1) and a
CORBA server (case 2) with respective clients, and the pair of
client-servers work fine as long as they are CORBA-to-CORBA and RMI-to-RMI.
But the problem arises when I tried using the RMI server (via IIOP) with the
CORBA client, when the client tries to narrow the object ref obtained from
the naming service into the CORBA idl defined type (StockTrader) it ends up
with a class cast exception.
This is what I did to achieve the above results:
[1] Define an RMI interface StockTrader.java (extending java.rmi.Remote)
with the method,
public String lookup( String symbol) throws RMIException;
[2] Implement the StorckTrader interface (on a PortableRemoteObject derived
class, to make it IIOP compliant), and then the server to register the stock
trader with COS Naming service as follows:
String homeName =....
StockTraderImpl trader =new StockTraderImpl();
System.out.println("binding obj <" homeName ">...");
java.util.Hashtable ht =new java.util.Hashtable();
ht.put("java.naming.factory.initial", args[2]);
ht.put("java.naming.provider.url", args[3]);
Context ctx =new InitialContext(ht);
ctx.rebind(homeName, trader);
[3] Generate the RMI-IIOP skeletons for the Implementation class,
rmic -iiop stock.StockTraderImpl
[4] generate the IDL for the RMI interface,
rmic -idl stock.StockTraderImpl
[5] Generate IDL stubs for the CORBA client,
idlj -v -fclient -emitAll StockTraderImpl.idl
[6] Write the client to use the IDL-defined stock trader,
String serverName =args[0];
String symList =args[1];
StockClient client =new StockClient();
System.out.println("init orb...");
ORB orb =ORB.init(args, null);
System.out.println("resolve init name service...");
org.omg.CORBA.Object objRef
=orb.resolve_initial_references("NameService");
NamingContext naming =NamingContextHelper.narrow(objRef);
... define a naming component etc...
org.omg.CORBA.Object obj =naming.resolve(...);
System.out.println("narrow objRef: " obj.getClass() ": " +obj);
StockTrader trader =StockTraderHelper.narrow(obj);
[7] Compile all the classes using Java 1.2.2
[8] start tnameserv (naming service), then the server to register the RMI
server obj
[9] Run the CORBA client, passing it the COSNaming service ref name (with
which the server obj is registered)
The CORBA client successfully finds the server obj ref in the naming
service, the operation StockTraderHelper.narrow() fails in the segment
below, with a class cast exception:
org.omg.CORBA.Object obj =naming.resolve(...);
StockTrader trader =StockTraderHelper.narrow(obj);
The <obj> returned by naming service turns out to be of the type;
class com.sun.rmi.iiop.CDRInputStream$1
This is of the same type when stock trader object is registered in a CORBA
server (as opposed to an RMI server), but works correctly with no casting
excpetions..
Any ideas / hints very welcome.
thanks in advance,
-hariOn the contrary... all that is being said is that we needed to provide clearer examples/documentation in the 5.1.0 release. There will be no difference between the product as found in the service pack and the product found in the 5.1.1. That is, the only substantive will be that 5.1.1 will also
include the examples.
"<=one way=>" wrote:
With reference to your and other messages, it appears that one should not
expect that WLS RMI-IIOP will work in a complex real-life system, at least
not now. In other words, support for real-life CORBA clients is not an
option in the current release of WLS.
TIA
"Eduardo Ceballos" <[email protected]> wrote in message
news:[email protected]...
We currently publish an IDL example, even though the IDL programmingmodel in Java is completely non-functional, in anticipation of the support
needs for uses who need to use IDL to talk to the Weblogic server,
generically. This example illustrates the simplest connectivity; it does not
address how
to integrate CORBA and EJB, a broad topic, fraught with peril, imo. I'llnote in passing that, to my knowledge, none of the other vendors attempt
this topic either, a point which is telling if all the less happy to hear.
For the record then, what is missing from our distribution wrt RMI-IIOPare a RMI-IIOP example, an EJB-IIOP example, an EJB-C++. In this you are
correct; better examples are forth coming.
Still, I would not call our RMI-IIOP implementation fragile. I would saythat customers have an understandably hard time accepting that the IDL
programming model is busted; busted in the sense that there are no C++
libraries to support the EJB model, and busted in the sense that there is
simply no
support in Java for an IDL interface to an EJB. Weblogic has nothing to doit being busted, although we are trying to help our customers deal with it
in productive ways.
For the moment, what there is is a RMI (over IIOP) programming model, aninherently Java to Java programming model, and true to that, we accept and
dispatch IIOP request into RMI server objects. The way I look at it is this:
it's just a protocol, like HTTP, or JRMP; it's not IDL and it has
practically nothing to do with CORBA.
ST wrote:
Eduardo,
Can you give us more details about the comment below:
I fear that as soon as the call to narrow succeeds, the remainingapplication will fail to work correctly because it is too difficult ot
use an idl client in java to work.It seems to me that Weblogic's RMI-IIOP is a very fragile
implementation. We
don't need a "HelloWorld" example, we need a concrete serious example(fully
tested and seriously documented) that works so that we can get a betteridea
on how to integrate CORBA and EJB.
Thanks,
Said
"Eduardo Ceballos" <[email protected]> wrote in message
news:[email protected]...
Please post request to the news group...
As I said, you must separate the idl related classes (class files and
java
files) from the rmi classes... in the rmic step, you must set a newtarget
(as you did), emit the java files into that directory (it's not clearyou
did this), then remove all the rmi class files from the class path... ifyou
need to compile more classes at that point, copy the java files to theidl
directly is you must, but you can not share the types in any way.
I fear that as soon as the call to narrow succeeds, the remainingapplication will fail to work correctly because it is too difficult otuse
an idl client in java to work.
Harindra Rajapakshe wrote:
Hi Eduardo,
Thanks for the help. That is the way I compiled my CORBA client, by
separating the IDL-generated stubs from the RMI ones, but still I
get a
CORBA.BAD_PARAM upon narrowing the client proxy to the interfacetype.
Here's what I did;
+ Define the RMI interfaces, in this case a StockTrader interface.
+ Implement RMI interface by extendingjavax.rmi.PortableRemoteObject
making
it IIOP compliant
+ Implemnnt an RMI server, and compile using JDK1.2.2
+ use the RMI implementation to generate CORBA idl, using RMI-IIOPplugin
utility rmic;
rmic -idl -noValueMethods -always -d idl stock.StockTraderImpl
+ generate Java mappings to the IDL generated above, using RMI-IIOPplugin
util,
idlj -v -fclient -emitAll -tf src stocks\StockTrader.idl
This creates source for the package stock and also
org.omg.CORBA.*
package, presumably IIOP type marshalling
+ compile all classes generated above using JDK1.2.2
+ Implement client (CORBA) using the classes generated above, NOTthe
RMI
proxies.
+ start RMI server, with stockTrader server obj
+ start tnameserv
+ start CORBA client
Then the client errors when trying to narrow the obj ref from the
naming
service, into the CORBA IDL defined interface using,
org.omg.CORBA.Object obj =naming.resolve(nn);
StockTrader trader =StockTraderHelper.narrow(obj); // THIS
ERRORS..!!!
throwing a CORBA.BAD_PARAM exception.
any ideas..?
Thanks in advance,
-hari
----- Original Message -----
From: Eduardo Ceballos <[email protected]>
Newsgroups: weblogic.developer.interest.rmi-iiop
To: Hari Rajapakshe <[email protected]>
Sent: Wednesday, July 26, 2000 4:38 AM
Subject: Re: problem using CORBA clients with RMI/EJBservers..!!!???
Please see the post on june 26, re Errors compiling... somewherein
there,
I suspect, you are referring to the rmi class file when you are
obliged
to
completely segregate these from the idl class files.
Hari Rajapakshe wrote:
Hi,
I have a question on using EJB / or RMI servers with CORBA
clients
using
RMI-IIOP transport, which in theory should work, but in practice
has
few
glitches.
Basically, I have implemented a very simple server,
StockTreader,
which
looks up for a symbol and returns a 'Stock' object. In the firstexample, I
simplified the 'Stock' object to be a mere java.lang.String, so
that
lookup
would simply return the 'synbol'.
Then I have implemented the above, as an RMI-IIOP server (case
1)
and a
CORBA server (case 2) with respective clients, and the pair of
client-servers work fine as long as they are CORBA-to-CORBA andRMI-to-RMI.
But the problem arises when I tried using the RMI server (via
IIOP)
with
the
CORBA client, when the client tries to narrow the object ref
obtained
from
the naming service into the CORBA idl defined type (StockTrader)
it
ends
up
with a class cast exception.
This is what I did to achieve the above results:
[1] Define an RMI interface StockTrader.java (extending
java.rmi.Remote)
with the method,
public String lookup( String symbol) throws RMIException;
[2] Implement the StorckTrader interface (on a
PortableRemoteObject
derived
class, to make it IIOP compliant), and then the server to
register
the
stock
trader with COS Naming service as follows:
String homeName =....
StockTraderImpl trader =new StockTraderImpl();
System.out.println("binding obj <" homeName ">...");
java.util.Hashtable ht =new java.util.Hashtable();
ht.put("java.naming.factory.initial", args[2]);
ht.put("java.naming.provider.url", args[3]);
Context ctx =new InitialContext(ht);
ctx.rebind(homeName, trader);
[3] Generate the RMI-IIOP skeletons for the Implementation
class,
rmic -iiop stock.StockTraderImpl
[4] generate the IDL for the RMI interface,
rmic -idl stock.StockTraderImpl
[5] Generate IDL stubs for the CORBA client,
idlj -v -fclient -emitAll StockTraderImpl.idl
[6] Write the client to use the IDL-defined stock trader,
String serverName =args[0];
String symList =args[1];
StockClient client =new StockClient();
System.out.println("init orb...");
ORB orb =ORB.init(args, null);
System.out.println("resolve init name service...");
org.omg.CORBA.Object objRef
=orb.resolve_initial_references("NameService");
NamingContext naming=NamingContextHelper.narrow(objRef);
... define a naming component etc...
org.omg.CORBA.Object obj =naming.resolve(...);
System.out.println("narrow objRef: " obj.getClass() ":"
+obj);
StockTrader trader =StockTraderHelper.narrow(obj);
[7] Compile all the classes using Java 1.2.2
[8] start tnameserv (naming service), then the server to
register
the
RMI
server obj
[9] Run the CORBA client, passing it the COSNaming service ref
name
(with
which the server obj is registered)
The CORBA client successfully finds the server obj ref in the
naming
service, the operation StockTraderHelper.narrow() fails in thesegment
below, with a class cast exception:
org.omg.CORBA.Object obj =naming.resolve(...);
StockTrader trader =StockTraderHelper.narrow(obj);
The <obj> returned by naming service turns out to be of the
type;
class com.sun.rmi.iiop.CDRInputStream$1
This is of the same type when stock trader object is registeredin a
CORBA
server (as opposed to an RMI server), but works correctly with
no
casting
excpetions..
Any ideas / hints very welcome.
thanks in advance,
-hari -
Bad response in a Web Service on OC4J with many concurrrent clients
We have a Web Service in a OC4J container, this Web Services invoke the business services from another complex application (another ear with EJBs in the same container) with RMI connections.
We need this web service support many concurrent clients, but in our tests the performance is very bad, the web service supports ten concurrent clients in a long response time for all of them, (for one client the Web Service responses in 3 seconds / for 10 clients in 45 seconds) if we test with 20 concurrent clients, the web service can´t process at least 15 requests , the other 5 finish well
What can I do to improve the performance with many concurrent clients (100 +)Hello,
I am quite surprised...
Could you please give us more information about your environment and behavior:
1- which version of oracleAS, WS and J2EE are you using?
2- do you have any information in the application log about possible source of error?
3- Any information about performance of the different layers?
Can you simplify the flow by creating the service in the same EAR than the EJB and void RMI calls for example?
regards
Tugdual Grall -
I have 4 BMP EJBs which all use the same datasource for connecting to the database.
When i create an object, all 4 report that they were succesfully created (dont throw any exceptions and i can print their primary key), however only 1 of them gets inserted into the database. I print out the row count returned from the myPreparedStatement.executeUpdate(sql) call in my ejbCreate method and it is always 1.
I am using Sun Application Server PE8 and PostgreSQL 7.4.2
This used to work on the Sun Reference Implementation for J2EE 1.3
Any suggestions what could be causing this?
Thanks,
Tobyfor future reference, it was because i had the old client stubs being deployed with the EJBs.
Oops -
Hi, I have a late 2011 MacBook Pro but cant get the mirroring function to work with Apple TV. I've got the most recent Software 10.7.5 but cant see the mirroring icon or turn this on. I'm able to mirror from my Ipad but not my Mac, any thoughts?
Welcome to the Apple Support Communities
AirPlay Mirroring is supported on your Mac, but it needs OS X Mountain Lion (10.8). See > http://support.apple.com/kb/HT5404
You have two possibilities:
1. Make a backup, open App Store and purchase Mountain Lion to upgrade to this OS X. Then, you will find the AirPlay Mirroring icon at the top right of the display, on the menu bar, or on System Preferences > Displays.
2. Keep OS X Lion and use AirParrot > http://www.airparrot.com
Both options work properly, but I recommend AirPlay Mirroring as it doesn't need a third-party program -
i just got a new iphone 4 for att and my friend installed the sim card in it for me. the imessage function isnt connecting with the my cell number. a while back i had logged into my apple account on someone elses cell phone and their number keeps showing. when i try to just select my number to send and recieve imessages from it will not show up. i can send and recieve regular text but not pictures or imessage. i have tried logging off and restarting and nothing has worked.help please!!
Did you remove your account information from the other person's iPhone?
-
Does anybody have a functioning 17" mbp with a 6Gb/s SSD drive?
I ordered a MacBookPro 17" (June 2011) with the 7200rpm hard drive which is a slow drive, but comes at no extra cost with the machine.
The ssd's Apple ships with the mbp's are relatively slow and expensive, so I do not consider them an option. I therefore ordered an OWC Mercury Pro 6G (240GB) sata3 SSD drive and replaced the hard drive with it. Under both Snow Leopard and Lion I get beach balls almost continuously. Installing the ssd in a co-workers 15" mbp makes the drives work at over 500 mb/s, so the drive is not the problem.
I explained this to the people at AppleCare's helpdesk and they state, since I used a non Apple item, they can't help me. They tell me to go to a local reseller and have them install the ssd for me. This way the mbp is still valid for AppleCare. The local reseller won't touch my mbp since I bought it online at Apple (and not at his store), plus I did not buy the OWC drive in his store. In short, AppleCare is useless here. They claim I should've ordered one of the Apple ssd's (which are basically sata2 drives).
Since the 17" mbp supports sata3 and has the fastest processors of the mbp range (which is why I bought it in the first place) I do not understand why Apple would force me to 'downgrade' to a non current ssd. I work with large 3D drawing files as well as multilayered large photoshop files, so having a fast drive is very beneficial to my workflow. The hardware in the 13" and 15" mbp's support the functionality of a 6G ssd in practice, whereas the 17" mbp only does that on paper. Selling my 17" and swapping it for a 15" model seems the only option but I refuse to believe a company that claims to be technologically advanced can ignore having specifications that only work on paper. There is no record, comment or even gossip of Apple indicating this is a problem, let alone they are working on a fix, despite finding numerous forums online where people have the same problem I have.
So for the record, on the official Apple Support site, directed to both Apple developers and users:
Is there anybody that has a functioning 17" MBP with a 6Gb/s SSD?
If you have, please let me know the specs or your machine and drive so I can see if there is a solution to unleash the full potential of my MBP.
I believe there is no sadder sight than the sullen tread of a caged (osx) Lion. Help me free the desert's fallen king!! ;-)Thanks wjosten for your reply. I filled out a feedback form.
To comment on AussieDJ's post: I tried the OWC shielding kit, doesn't work. The problems described with 6Gb/s ssd's were all with pre March MBP's. Mine is a June 2011 MBP so I figured the problem would've been solved in the mean time. I guessed wrong there. Since I waited for the release of OSX Lion (and the trim support functionality) I thought this would solve the spinning beach ball issue. I guessed wrong there as well. Can't return the ssd anymore (>30 days) so I glued the ssd on our offices "wall of shame". Being an architecture office we have everybody in the office put up poorly designed objects here (sort of a cool and uncool board but then labelled ***? and No way!). I should've glued y 17" MBP on this wall actually (since it's hardware does not work with the 6Gb/s ssd), but the bugger is too heavy and won't stick... ;-)
The worst part of the story is that my dad got his 6Gb/s ssd to wortk in his windows notebook...and he does not skip an opportunity to rub it in (your MBP can't do no 6G)!
Let's hope there will be an EFI update! -
Upgraded to os7 and done my updates on the apps as they appear.. Any function to do with the iBook store is not working or visible. The purchase at the end of a sample book doesn't work either. Anyone have a solution?
Upgraded to os7 and done my updates on the apps as they appear.. Any function to do with the iBook store is not working or visible. The purchase at the end of a sample book doesn't work either. Anyone have a solution?
-
Use of business partner functionality in combination with dual control
Is there a generally agreed upon procedure to use the business partner functionality in combination with dual control? The problem is that when you block a business partner, the customer/ vendor master data aren't blocked automatically. You can then still use them in transactions, which leads to problems.
So is there a way to make this work or a procedure to do this?
Niels VanwinghThanks Masa,
I did notice the 'Add external supplier from' in create supplier or bidder option. However there is a small catch and your experience may help.
Let me explain the requirement and scenario here in SRM 7.
We are implementing the Registration of Supplier scenario; both ROS and SRM are in same client. When a potential supplier registers themselves in the registration system, a BP number is created (an Internal number range is defined for this). After accepting the potential supplier in pre-select screen the purchaser has two options to transfer the potential supplier from the ROS system to SRM
Option 1: He can select the accepted potential supplier from the supplier directory option and transfer the business partner to SRM. In this case the business partner number of the potential supplier is retained in SRM and a business partner with supplier and bidder tag is created. However the purchaser does not have any option to select which type of business partner he would like to create like supplier or bidder.
Option 2: Purchase can go to create supplier or bidder option and choose the u2018Add external supplier formu2019 from the ROS system and create the business partner. The ROS business partner details are copied to the create supplier screen, but the purchaser have to provide an external business partner number for the supplier. This is because we have defined external number range for business partner for the vendors that are replicated from ERP to SRM.
Objective is the ROS business partner should be retained in SRM with option to create as supplier and bidder and then manually create ERP supplier with same SRM BP number and map against SRM supplier.
Is there any way we can achieve this?
In SRM 5.5 with Manage business partner functionality we could achieve as system give us the option which business partner type we would like to create as well as retains the ROS BP number in SRM.
Regards
Sandeep
Maybe you are looking for
-
I can't open the "Save as" version of my project.
I've made a save as version on a session. When i click on the "Saved as" icon, the : "Logic pro quit unexpectedly " pops up. So i don't have acces to it. I've spent hours working on this "save as" version. Note that the original "link" opens properl
-
My family recently gave me an iPad for Mother's Day. It's been really awesome, but suddenly today I began getting an error: "Cannot connect to iTunes Store." The process looks great right up to the download. Then, after the icon appears with the stat
-
Win 8.1 and ATI Radeon 3650
Is there a driver for Win 8.1 which allows to use the switchable graphics function? After installing Win 8.1 I just can use the onboard graphic card. The only driver I found is made for Win 7 and doesn't work. A driver for ATI Radeon 3650 is installe
-
I have an older version of Firefox and adobe on a Sony VAIO. I keep getting pop-ups telling me to upgrade, and also frequent failures when I try to use the browser. I try to upgrade. I go thru the download step, then try the run step and get a messag
-
Javax.xml.rpc.ServiceException: java.lang.NullPointerExc
Hello! Can somebody help me? I tried to call web service? usimg DII Client. Here is the code: String[] res = null; String nmsp = "urn:foo";//targetNamespace in WSDL String qnameService = "ServiceName"; String qnamePort = "PortName";//<port name in WS