Delphi access EJB object on WLS through CORBA
Hi! I'm currently working on a project based on WLS.
On the client side, our client expects us to use Delphi. So our resolution
for this is using corba to get data back from WLS (through the standard
protocol IIOP?) .
What I'm concerned now is whether WLS supports it?
Thanks,
LiWei
"liwei" <[email protected]> writes:
Hi! I'm currently working on a project based on WLS.
On the client side, our client expects us to use Delphi. So our resolution
for this is using corba to get data back from WLS (through the standard
protocol IIOP?) .
What I'm concerned now is whether WLS supports it?Yes, but you really need OBV support - which Delphi may or may not
have. Also if you are using WLS 6.0 make sure you install SP2.
andy
Similar Messages
-
Remote client accessing ejb - question
This may be a very simplistic question, but here goes -
scenario: I have a J2EE application running on a server Y with session beans/entity beans.
I need a remote client on machine X to access EJB objects on Y.
I have set the initial conext with INITIAL_CONTEXT_FACTORY, PROVIDER_URL etc...
But, in order to narrow the reference of the object returned by lookup() method, I need to instantiate the Home object of my session (or entity) bean ...
here's my problem: How do I instantiate EJBHomeInterface or EJBRemoteInterface, when they do not exist on the remote client machine?? (does this have something to do with the stub??)
THANKS!This answer assumes you're using Weblogic, although most any other EJB container has a facility for this. Basically you need to distribute a client jar file with the client. This client jar is created during the EJB compile/deployment process and creates a jar separate from the normal jar file associated with your deployment. This jar file contains the class stubs you need to call for and use EJB's on a remote client.
I hope this makes some sense.
SeanB -
Unable to access remote EJB object on different server
I have deployed an EJB module on one server. I have been able to access the entity beans on this server from a standalone java client (on a different machine) using the CORBA Interopable Naming Syntax. Using this syntax
corbaname:iiop:<hostname>:port#<jndi-name>
However, when I deploy another EJB module on a separate server I am unable to access the objects held on the original server. I am using the same syntax as the java client.
We are using Sun Application Server to deploy the modules. The error held in the server log is below. Can someone help with this. Does the Sun Application Server prevent connection to remote objects by default?
[#|2005-12-09T17:39:55.703+0000|SEVERE|sun-appserver-pe8.1_02|javax.enterprise.resource.corba._DEFAULT_.rpc.transport|_ThreadID=11;|"IOP00410216: (COMM_FAILURE) Unable to create IIOP listener on the specified host/port: all interfaces/3700"
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 216 completed: No
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.createListenerFailed(ORBUtilSystemException.java:2661)
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.createListenerFailed(ORBUtilSystemException.java:2681)
at com.sun.corba.ee.impl.transport.SocketOrChannelAcceptorImpl.initialize(SocketOrChannelAcceptorImpl.java:167)
at com.sun.corba.ee.impl.transport.CorbaTransportManagerImpl.getAcceptors(CorbaTransportManagerImpl.java:207)
at com.sun.corba.ee.impl.transport.CorbaTransportManagerImpl.addToIORTemplate(CorbaTransportManagerImpl.java:224)
at com.sun.corba.ee.spi.oa.ObjectAdapterBase.initializeTemplate(ObjectAdapterBase.java:104)
at com.sun.corba.ee.impl.oa.toa.TOAImpl.<init>(TOAImpl.java:78)
at com.sun.corba.ee.impl.oa.toa.TOAFactory.getTOA(TOAFactory.java:65)
at com.sun.corba.ee.impl.orb.ORBImpl.connect(ORBImpl.java:1536)
at com.sun.corba.ee.spi.presentation.rmi.StubAdapter.connect(StubAdapter.java:164)
at com.sun.corba.ee.impl.orbutil.ORBUtility.connectAndGetIOR(ORBUtility.java:825)
at com.sun.corba.ee.impl.orb.ORBImpl.getFVDCodeBaseIOR(ORBImpl.java:901)
at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.addServiceContexts(CorbaClientRequestDispatcherImpl.java:737)
at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:227)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:127)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:244)
at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69)
at com.sun.jndi.cosnaming.CNCtx.setOrbAndRootContext(CNCtx.java:345)
at com.sun.jndi.cosnaming.CNCtx.initUsingCorbanameUrl(CNCtx.java:321)
at com.sun.jndi.cosnaming.CNCtx.initUsingUrl(CNCtx.java:247)
at com.sun.jndi.cosnaming.CNCtx.createUsingURL(CNCtx.java:85)
at com.sun.jndi.url.iiop.iiopURLContextFactory.getUsingURLIgnoreRest(iiopURLContextFactory.java:56)
at com.sun.jndi.url.iiop.iiopURLContext.getRootURLContext(iiopURLContext.java:44)
at com.sun.jndi.toolkit.url.GenericURLContext.lookup(GenericURLContext.java:182)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at com.ppl.services.ServiceLocator.lookup(ServiceLocator.java:47)
at com.ppl.services.ServiceLocator.getRemoteHome(ServiceLocator.java:74)
at com.ppl.services.ServiceLocator.getRemoteUSRRoutinesHome(ServiceLocator.java:134)
at com.ppl.business.LoginBusiness.isUserServiceAvailable(LoginBusiness.java:50)
at org.apache.jsp.testEJBComponents_jsp._jspService(testEJBComponents_jsp.java:72)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:105)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:336)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:251)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
at sun.reflect.GeneratedMethodAccessor60.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257)
at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:263)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:225)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:132)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:185)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:653)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:534)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.doTask(ProcessorTask.java:403)
at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:55)
Caused by: java.lang.Error: Untranslated exception
at sun.nio.ch.Net.translateToSocketException(Net.java:63)
at sun.nio.ch.Net.translateException(Net.java:79)
at sun.nio.ch.Net.translateException(Net.java:85)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:61)
at com.sun.enterprise.server.ss.ASServerSocket.bind(ASServerSocket.java:258)
at com.sun.enterprise.server.ss.ASServerSocket.bind(ASServerSocket.java:231)
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createServerSocket(IIOPSSLSocketFactory.java:289)
at com.sun.corba.ee.impl.transport.SocketOrChannelAcceptorImpl.initialize(SocketOrChannelAcceptorImpl.java:160)
... 62 more
Caused by: java.net.SocketException: Already bound
at sun.nio.ch.Net.translateToSocketException(Net.java:49)
... 69 more
Caused by: sun.nio.ch.AlreadyBoundException
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:114)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59)
... 66 more
|#]
[#|2005-12-09T17:39:55.703+0000|WARNING|sun-appserver-pe8.1_02|javax.enterprise.resource.corba._INITIALIZING_.rpc.presentation|_ThreadID=11;|"IOP02310202: (OBJ_ADAPTER) Error in connecting servant to ORB"
org.omg.CORBA.OBJ_ADAPTER: vmcid: SUN minor code: 202 completed: No
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.orbConnectError(ORBUtilSystemException.java:8276)
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.orbConnectError(ORBUtilSystemException.java:8294)
at com.sun.corba.ee.impl.orb.ORBImpl.connect(ORBImpl.java:1538)
at com.sun.corba.ee.spi.presentation.rmi.StubAdapter.connect(StubAdapter.java:164)
at com.sun.corba.ee.impl.orbutil.ORBUtility.connectAndGetIOR(ORBUtility.java:825)
at com.sun.corba.ee.impl.orb.ORBImpl.getFVDCodeBaseIOR(ORBImpl.java:901)
at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.addServiceContexts(CorbaClientRequestDispatcherImpl.java:737)
at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:227)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:127)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:244)
at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69)
at com.sun.jndi.cosnaming.CNCtx.setOrbAndRootContext(CNCtx.java:345)
at com.sun.jndi.cosnaming.CNCtx.initUsingCorbanameUrl(CNCtx.java:321)
at com.sun.jndi.cosnaming.CNCtx.initUsingUrl(CNCtx.java:247)
at com.sun.jndi.cosnaming.CNCtx.createUsingURL(CNCtx.java:85)
at com.sun.jndi.url.iiop.iiopURLContextFactory.getUsingURLIgnoreRest(iiopURLContextFactory.java:56)
at com.sun.jndi.url.iiop.iiopURLContext.getRootURLContext(iiopURLContext.java:44)
at com.sun.jndi.toolkit.url.GenericURLContext.lookup(GenericURLContext.java:182)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at com.ppl.services.ServiceLocator.lookup(ServiceLocator.java:47)
at com.ppl.services.ServiceLocator.getRemoteHome(ServiceLocator.java:74)
at com.ppl.services.ServiceLocator.getRemoteUSRRoutinesHome(ServiceLocator.java:134)
at com.ppl.business.LoginBusiness.isUserServiceAvailable(LoginBusiness.java:50)
at org.apache.jsp.testEJBComponents_jsp._jspService(testEJBComponents_jsp.java:72)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:105)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:336)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:251)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
at sun.reflect.GeneratedMethodAccessor60.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257)
at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:263)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:225)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:132)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:185)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:653)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:534)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.doTask(ProcessorTask.java:403)
at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:55)
Caused by: org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 216 completed: No
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.createListenerFailed(ORBUtilSystemException.java:2661)
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.createListenerFailed(ORBUtilSystemException.java:2681)
at com.sun.corba.ee.impl.transport.SocketOrChannelAcceptorImpl.initialize(SocketOrChannelAcceptorImpl.java:167)
at com.sun.corba.ee.impl.transport.CorbaTransportManagerImpl.getAcceptors(CorbaTransportManagerImpl.java:207)
at com.sun.corba.ee.impl.transport.CorbaTransportManagerImpl.addToIORTemplate(CorbaTransportManagerImpl.java:224)
at com.sun.corba.ee.spi.oa.ObjectAdapterBase.initializeTemplate(ObjectAdapterBase.java:104)
at com.sun.corba.ee.impl.oa.toa.TOAImpl.<init>(TOAImpl.java:78)
at com.sun.corba.ee.impl.oa.toa.TOAFactory.getTOA(TOAFactory.java:65)
at com.sun.corba.ee.impl.orb.ORBImpl.connect(ORBImpl.java:1536)
... 56 more
Caused by: java.lang.Error: Untranslated exception
at sun.nio.ch.Net.translateToSocketException(Net.java:63)
at sun.nio.ch.Net.translateException(Net.java:79)
at sun.nio.ch.Net.translateException(Net.java:85)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:61)
at com.sun.enterprise.server.ss.ASServerSocket.bind(ASServerSocket.java:258)
at com.sun.enterprise.server.ss.ASServerSocket.bind(ASServerSocket.java:231)
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createServerSocket(IIOPSSLSocketFactory.java:289)
at com.sun.corba.ee.impl.transport.SocketOrChannelAcceptorImpl.initialize(SocketOrChannelAcceptorImpl.java:160)
... 62 more
Caused by: java.net.SocketException: Already bound
at sun.nio.ch.Net.translateToSocketException(Net.java:49)
... 69 more
Caused by: sun.nio.ch.AlreadyBoundException
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:114)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59)
... 66 more
|#]http://docs.sun.com/source/819-0079/dgjndi.html
-
Accessing EJB's from CORBA clients
Hi!
Can someone answer one badly important question?
Is it possible to access EJB's from CORBA clients directly, as if the
beans were ordinary CORBA objects? I mean DIRECT access - WIDHOUT
CORBA/Java server application as a liason between CORBA client and EJB
server!
I'm using WebLogic Enterprise 5.0.1.
Thanks in advance.
Aleksey.Please reference a later posting on this very same question.
-- Lou Caraballo
Sr. Systems Engineer
BEA Systems Inc., Denver Telco Group
719-332-0818 (cell)
720-528-6073 (denver)
Aleksey Bukavnev <[email protected]> wrote in message
news:[email protected]..
Thank you!
Aleksey.
Bill Lloyd wrote:
There is a java to IDL mapping, which is quite complex. To use it, you
must
have an ORB which supports, at minimum, CORBA 2.3. ORBs I know of which
support this include Orbix 2000 for Java, Visibroker 4.0 for Java, and
Orbacus 4.0 for Java.
Also, check out the June 2000 "Java Report" which has an article onthis.
>>
To be perfectly honest, though, the best solution is to write a bridge,in
Java. One side is IDL, which CORBA clients use. The implementation ofthat
IDL makes RMI requests to get the necessary info. This solution willwork,
guaranteed. The portion of the spec for the java to IDL mapping isstill
quite new, and I would expect some, uh, "unexpected features" at thistime.
>>
-B
"Aleksey Bukavnev" <[email protected]> wrote in message
news:[email protected]..
Hi!
Can someone answer one badly important question?
Is it possible to access EJB's from CORBA clients directly, as if the
beans were ordinary CORBA objects? I mean DIRECT access - WIDHOUT
CORBA/Java server application as a liason between CORBA client and EJB
server!
I'm using WebLogic Enterprise 5.0.1.
Thanks in advance.
Aleksey. -
One EJB object accessed by two clients.
One client access a EJB object another client access the same EJB
object, when the first client releases the ejb object, then second
client loses data or gets null.
Any body knows what is happening?
Thankshey,
is this with StatefulSession Bean. I too am experiencing the same problem. When two users are trying to access the same bean the same time, one is returing null. This being a UserSession Bean, one user is getting the session object as null..
Can anyone answer this problem....
cheers,
prasad. -
How can I access EJB through executable jar file?
Hello buddies!!
I wonder if anyone could give me an explanation of how accessing EJB through executable jar file?Thanks!!Hi there,
You'll need to install the J2EE SDK on the client and include the <j2ee install dir>\lib\j2ee.jar file in your CLASSPATH along with the Client Jar file that was generated by the deploytool when you deployed the application.
In your client code the Context properties are as follows:
Properties p = new Properties();
p.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.cosnaming.CNCtxFactory");
p.put(Context.PROVIDER_URL, "iiop://hostname:portnumber");
Context cntx = new InitialContext(p).Hope this helps
Amanda
Developer Technical Support
Sun Microsystems
http://www.sun.com/developers -
Tunneling vs. Web Service to access EJB's through firewall
I need to be able to access EJB's from a client application when the server is
behind a firewall. Seems like I have two options:
1) Use WebLogic's built-in http-tunneling support.
2) Use WebLogic to generate a web service for each bean and then modify the client
application to use the generated SOAP stubs instead of having direct EJB references.
Now I know either option will result in slower performance as compared to direct
EJB references, but I'm not sure which is worse. Has BEA done any comparison
of the two approaches to know which one is expected to perform better than the
other? Any guidence someone can provide is greatly appreciated.
thanks,
DanRob Woollen <[email protected]> wrote:
It depends :>
If performance is your primary concern that it would be best to
benchmark both. I suspect the performance difference will greatly
depend on what types you are marshalling.Yep, I was curious about the same thing and tried some benchmarking - depending
on what was marshalled, or course, SOAP performance hit vs binary protocol was
not as bad as i expected it to be.
However, a web service client would offer some nice advantages. Your
client application would be a lot more flexible.But there will be some functionality loss over RMI.
-- Rob
Dan Branley wrote:
I need to be able to access EJB's from a client application when the server is
behind a firewall. Seems like I have two options:
1) Use WebLogic's built-in http-tunneling support.
2) Use WebLogic to generate a web service for each bean and then modify the client
application to use the generated SOAP stubs instead of having direct EJB references.
Now I know either option will result in slower performance as compared to direct
EJB references, but I'm not sure which is worse. Has BEA done any comparison
of the two approaches to know which one is expected to perform better than the
other? Any guidence someone can provide is greatly appreciated.
thanks,
Dan
Dimitri -
Accessing DCOM objects through WebLogic
Is it possible to access DCOM objects with WebLogic ?
Olivier
[olivier.vcf]Thanks for the tip. I have tried the Excel example and it works great !!
Olivier
Damian Mehers wrote:
You could use the J-Integra pure Java-COM bridge to do this. Your WebLogic
based Java client can be running anywhere that WebLogic runs (such as a UNIX
box) and you won't need to install anything on the Windows box hosting the
COM components.
Documentation and download:
http://www.linar.com/
Regards,
Damian
"Olivier Brand" <[email protected]> wrote in message
news:[email protected]..
Is it possible to access DCOM objects with WebLogic ?
Olivier
[olivier.vcf] -
Accessing EJBs as COM objects.
Hi,
I want to access deployed EJBs from Visual Basic.
I've used Sun's COM-CAS bridge inside a VB application to access EJBs deployed in their J2EE server and it worked OK.
How do I do the same thing with EJBs in Oracle8i (8.1.5)?
Does Oracle provide a similar package to Sun's COM-CAS bridge?
Do I deploy to OAS instead of Oracle8i to achieve what I want to do?
Any help would be appreciated.
ThanksA search of the forum using "Java COM" turned this up:
http://forum.java.sun.com/thread.jsp?forum=54&thread=106901
Try it on your machine and see what you get back. Searches are always a good thing, especially if you're new. - MOD -
Problem in getting handle to EJB Object
Hi All,
I am getting following exception when i try to get handle on my ejb object.
My Client Program:
import synch.*;
import javax.naming.*;
import java.rmi.*;
import javax.rmi.*;
import javax.ejb.*;
import java.io.*;
public class SearlizeClient
public static void main(String[] args) throws Exception
Context ic = new InitialContext();
Object o = ic.lookup("NameBean"); // replace with YOUR JNDI name for the bean
NameHome nameHome = (NameHome) PortableRemoteObject.narrow(o, NameHome.class);
synch.Name obj1 = nameHome.create();
obj1.setName("Balaji");
Handle myHandle= obj1.getHandle();// Getting exception at this place
FileOutputStream out = new FileOutputStream("MyHandle.txt");
ObjectOutputStream s = new ObjectOutputStream(out);
s.writeObject(obj1);
s.flush();
out.close();
I got following excetion when i try to get handle on EJBObject
Dec 6, 2005 11:20:19 AM com.sun.corba.se.impl.encoding.CDRInputStream_1_0 read_value
WARNING: "IOP00810257: (MARSHAL) Could not find class"
org.omg.CORBA.MARSHAL: vmcid: SUN minor code: 257 completed: Maybe
at com.sun.corba.se.impl.logging.ORBUtilSystemException.couldNotFindClass(ORBUtilSystemExcep
tion.java:7756)
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1013
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:879)
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_abstract_interface(CDRInputStream_
1_0.java:873)
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_abstract_interface(CDRInputStream_
1_0.java:863)
at com.sun.corba.se.impl.encoding.CDRInputStream.read_abstract_interface(CDRInputStream.java
:269)
at synch._Name_Stub.getHandle(Unknown Source)
at SearlizeClient.main(SearlizeClient.java:20)
Caused by: java.lang.ClassNotFoundException
... 7 more
Exception in thread "main" java.rmi.MarshalException: CORBA MARSHAL 1398079745 Maybe; nested excepti
on is:
org.omg.CORBA.MARSHAL: vmcid: SUN minor code: 257 completed: Maybe
at com.sun.corba.se.impl.javax.rmi.CORBA.Util.mapSystemException(Util.java:197)
at javax.rmi.CORBA.Util.mapSystemException(Util.java:67)
at synch._Name_Stub.getHandle(Unknown Source)
at SearlizeClient.main(SearlizeClient.java:20)
Caused by: org.omg.CORBA.MARSHAL: vmcid: SUN minor code: 257 completed: Maybe
at com.sun.corba.se.impl.logging.ORBUtilSystemException.couldNotFindClass(ORBUtilSystemExcep
tion.java:7756)
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1013
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:879)
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_abstract_interface(CDRInputStream_
1_0.java:873)
at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_abstract_interface(CDRInputStream_
1_0.java:863)
at com.sun.corba.se.impl.encoding.CDRInputStream.read_abstract_interface(CDRInputStream.java
:269)
at synch._Name_Stub.getHandle(Unknown Source)
... 1 more
Caused by: java.lang.ClassNotFoundException
... 7 more
Enviroment: This bean is hosted on Sun J2ee Appserver 8.0 and normal client prg is working fine .. But it is failing in getting handle
Please suggest,
Thanks in advanceThe only way is to create your own equivalent of HttpSessionContext.
Its simple enough, just create a class that implements HttpSessionListener (responds to session creation, and destruction)
You can get the sessions as they are created, and keep a global reference to them, and manipulate it as much as you like. In your case you would probably want to index the sessions by userId rather than sessionId for easy access.
Good luck,
evnafets -
AM and accessing EJB's directly
We are protecting our web applications using AM. There are also several batch jobs running that use direct ejb access. We want to authenticate/authorize access to these ejb's as well. Has anyone tried this? Is there a way to do this without coding a new JAAS login module?
Message was edited by:
Stalis
Message was edited by:
StalisPlease reference a later posting on this very same question.
-- Lou Caraballo
Sr. Systems Engineer
BEA Systems Inc., Denver Telco Group
719-332-0818 (cell)
720-528-6073 (denver)
Aleksey Bukavnev <[email protected]> wrote in message
news:[email protected]..
Thank you!
Aleksey.
Bill Lloyd wrote:
There is a java to IDL mapping, which is quite complex. To use it, you
must
have an ORB which supports, at minimum, CORBA 2.3. ORBs I know of which
support this include Orbix 2000 for Java, Visibroker 4.0 for Java, and
Orbacus 4.0 for Java.
Also, check out the June 2000 "Java Report" which has an article onthis.
>>
To be perfectly honest, though, the best solution is to write a bridge,in
Java. One side is IDL, which CORBA clients use. The implementation ofthat
IDL makes RMI requests to get the necessary info. This solution willwork,
guaranteed. The portion of the spec for the java to IDL mapping isstill
quite new, and I would expect some, uh, "unexpected features" at thistime.
>>
-B
"Aleksey Bukavnev" <[email protected]> wrote in message
news:[email protected]..
Hi!
Can someone answer one badly important question?
Is it possible to access EJB's from CORBA clients directly, as if the
beans were ordinary CORBA objects? I mean DIRECT access - WIDHOUT
CORBA/Java server application as a liason between CORBA client and EJB
server!
I'm using WebLogic Enterprise 5.0.1.
Thanks in advance.
Aleksey. -
Issue in accessing EJB from plain java
Hi,
I am new to OAS. I am using OAS 10.1.2.
I want to access EJB which runs inside OAS, through a plain java program which runs from outside the OAS environment (standalone java program).
I am confused on what to use. RMIInitialContextFactory or ApplicationClientInitialContextFactory for the context in the java program.
what should be the provide URL ?
java.naming.provider.url","ormi://hostname:18140/
is it "ormi" or something else? what is the port number should i use. there are many ports in this OAS. i see that in the console("Ports") link.
also let me know what should i mention in the EJB xml descriptor.
Is this lookup to be done by retrieving from jndi?
pls help.
Thanks,
Sukumar
with this confusion i developed an EJB with the following details
ejb-jar.xml
<ejb-ref>
<ejb-ref-name>ejb/testDetails</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<home>com.xxx.xxx.testDetailsHome</home>
<remote>com.xxx.xxx.testDetails</remote>
</ejb-ref>
orion-ejb-jar.xml
<entity-deployment name="ejb/testDetails" location="ejb/testDetails"
Client Java program
public class testDetailsClient
public static void main(String [] args)
testDetailsClient testDetailsClient = new testDetailsClient();
try
Context context =getInitialContext();
testDetailsHome testDetailsHome = (testDetailsHome)PortableRemoteObject.narrow(context.lookup("java:comp/env/ejb/testDetails"), testDetailsHome.class);
testDetails testDetails;
catch(Throwable ex)
ex.printStackTrace();
private static Context getInitialContext() throws NamingException
Hashtable env = new Hashtable();
env.put("java.naming.factory.initial","com.evermind.server.rmi.RMIInitialContextFactory");
//env.put("java.naming.factory.initial","com.evermind.server.ApplicationClientInitialContextFactory");
env.put("java.naming.provider.url","ormi://host_name:18140/"); //23791 18140
env.put(Context.SECURITY_PRINCIPAL, "ias_admin");
env.put(Context.SECURITY_CREDENTIALS, "abc123");
InitialContext context = new InitialContext(env);
return context;
if i execute this, it says
javax.naming.NameNotFoundException: java:comp/env/ejb/testDetails not found
18140 is Application Server Control RMI port.
if i run the same code with ApplicationClientInitialContextFactory, it throws exception saying
java.lang.InstantiationException: No location specified and no suitable instance of the type 'com.testdetails.testDetails' found for the ejb-ref ejb/testDetails
at com.evermind.server.administration.ApplicationResourceFinder.getEJBHome(ApplicationResourceFinder.java:268)
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)
javax.naming.NamingException: Error reading application-client descriptor: No location specified and no suitable instance of the type 'com.testdetails.testDetails' found for the ejb-ref ejb/testDetails
at com.evermind.server.ApplicationClientInitialContextFactory.getInitialContext(ApplicationClientInitialContextFactory.java:161)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
at javax.naming.InitialContext.init(InitialContext.java:219)
at javax.naming.InitialContext.<init>(InitialContext.java:195)
at com.testdetails.testDetailsClient.getInitialContext(testDetailsClient.java:89)
at com.testdetails.testDetailsClient.main(testDetailsClient.java:20)
pls helpHi,
you do not have to package your EJB and PAR together! You can deploy them separately and then reference the J2EE Application from your PAR or vice versa to access it.
For instance you can access the EJB from your PAR as described here:
http://help.sap.com/saphelp_nw2004s/helpdata/en/42/9ddf20bb211d72e10000000a1553f6/frameset.htm
Or you can access a Portal application from J2EE like described here:
http://help.sap.com/saphelp_nw2004s/helpdata/en/42/9ddd0cbb211d72e10000000a1553f6/frameset.htm
Even if you package your PAR in to the same EAR with your EJB they will result in two different containers on the J2EE Engine and you will have to reference them as described in the link above to access the functionality of one component from the other.
Best regards,
Stefan Brauneis -
How to access ejb jar in ear package from other war web package?
How to access ejb in jar packed in ear package from other war web package?
Typically you would just look the EJB Home up in JNDI. If you're
looking for example code, the medrec example in WLS 8.1 or petstore has
plenty of webapps calling EJBs.
-- Rob
CottonXu wrote:
How to access ejb in jar packed in ear package from other war web package? -
Every once in a while (500 iterations or more) I'm getting an exception in the static method below stating "calling thread cannot access this object because a different thread owns it". Thing is, this method references no external objects
and performs no special threading operations. All of the WPF objects are created and consumed in this method. The only aspect that is multi-threaded is that this method can get called concurrently on different threads in the same app domain (the
project is a Windows service). That said the fileToDecollate parameter will be unique every time, so there is no "collision" as far as that goes.
Any ideas? This is maddening and in theory it should not be possible to blow this error.
Exception Information------------------------------------------
System.InvalidOperationException: The calling thread cannot access this object because a different thread owns it.
at System.Windows.Threading.Dispatcher.VerifyAccess()
at System.Windows.DependencyObject.GetLocalValueEnumerator()
at System.Windows.Xps.Serialization.SerializersCacheManager.GetTypeDependencyPropertiesCacheItem(Object serializableObject)
at System.Windows.Xps.Serialization.SerializersCacheManager.GetSerializableDependencyProperties(Object serializableObject)
at System.Windows.Xps.Serialization.SerializablePropertyCollection.InitializeSerializableDependencyProperties()
at System.Windows.Xps.Serialization.SerializablePropertyCollection.Initialize(PackageSerializationManager serializationManager, Object targetObject)
at System.Windows.Xps.Serialization.SerializableObjectContext.CreateContext(PackageSerializationManager serializationManager, Object serializableObject, SerializableObjectContext serializableObjectParentContext, SerializablePropertyContext serializablePropertyContext)
at System.Windows.Xps.Serialization.ReachSerializer.DiscoverObjectData(Object serializedObject, SerializablePropertyContext serializedProperty)
at System.Windows.Xps.Serialization.ReachSerializer.SerializeObject(Object serializedObject)
at System.Windows.Xps.Serialization.FixedDocumentSerializer.SerializeObject(Object serializedObject)
at System.Windows.Xps.Serialization.ReachDocumentReferenceSerializer.PersistObjectData(SerializableObjectContext serializableObjectContext)
at System.Windows.Xps.Serialization.ReachSerializer.SerializeObject(Object serializedObject)
at System.Windows.Xps.Serialization.ReachDocumentReferenceCollectionSerializer.SerializeDocumentReference(Object documentReference)
at System.Windows.Xps.Serialization.ReachDocumentReferenceCollectionSerializer.SerializeDocumentReferences(SerializableObjectContext serializableObjectContext)
at System.Windows.Xps.Serialization.ReachDocumentReferenceCollectionSerializer.PersistObjectData(SerializableObjectContext serializableObjectContext)
at System.Windows.Xps.Serialization.ReachSerializer.SerializeObject(SerializablePropertyContext serializedProperty)
at System.Windows.Xps.Serialization.ReachSerializer.SerializeProperty(SerializablePropertyContext serializablePropertyContext)
at System.Windows.Xps.Serialization.ReachSerializer.SerializeProperties(SerializableObjectContext serializableObjectContext)
at System.Windows.Xps.Serialization.ReachSerializer.SerializeObjectCore(SerializableObjectContext serializableObjectContext)
at System.Windows.Xps.Serialization.DocumentSequenceSerializer.PersistObjectData(SerializableObjectContext serializableObjectContext)
at System.Windows.Xps.Serialization.ReachSerializer.SerializeObject(Object serializedObject)
at System.Windows.Xps.Serialization.XpsSerializationManager.SaveAsXaml(Object serializedObject)
at System.Windows.Xps.XpsDocumentWriter.SaveAsXaml(Object serializedObject, Boolean isSync)
at System.Windows.Xps.XpsDocumentWriter.Write(FixedDocumentSequence fixedDocumentSequence)
at MyCompany.Utilities.Document.XPSDocument.Decollate(String fileToDecollate, String outputPath) in E:\Projects\MyCompany\Utilities\MyCompany.Utilities.Document\XPSDocument.cs:line 358
at MyCompany.Services.ERM.XPSCapture.Decollate(String fileToDecollate, String outputPath) in E:\Projects\MyCompany\Services\MyCompany.Services.ERM\XPSCapture.cs:line 210
at MyCompany.Services.ERM.ERMFileProcessor.decollateERMFile(String tempERMFile, IFileCapture fileCapture) in E:\Projects\MyCompany\Services\MyCompany.Services.ERM\ERMFileProcessor.cs:line 1257
at MyCompany.Services.ERM.ERMFileProcessor.process() in E:\Projects\doc-link\MyCompany\Services\Altec.Services.ERM\ERMFileProcessor.cs:line 354
at MyCompany.Services.ERM.ERMFileProcessor.Process(ProcessingCompleteCallback callback) in E:\Projects\MyCompany\Services\MyCompany.Services.ERM\ERMFileProcessor.cs:line 90
Additonal Info------------------------------------------
ExceptionManager.MachineName: BTP-30-DEV
ExceptionManager.WindowsIdentity: XXXXX-WA\Bradley
ExceptionManager.FullName: WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
ExceptionManager.AppDomainName: MyCompany.XXXXXXServiceHost.exe
ExceptionManager.ProcessInfo: PID=7392, ThreadID=7816, Managed ThreadID=36, Name=MyCompany.XXXXXXServiceHost, Uptime=00:02:12.2548416
ExceptionManager.ProcessResourceUsage: Working Set=265188 KB, Peak Working Set=525940 KB, Virtual Memory Size=530264 KB, Peak VM Size=809832 KB, Handles=631
ExceptionManager.SystemMemory: Load=81%, Total Physical=3168748 KB, Free Physical=586736 KB, Total PageFile=5213700
publicstaticList<string>
Decollate(stringfileToDecollate,
stringoutputPath)
// iterate fixed documents and fixed pages, create new XPS files
List<string>
xpsDecFiles = newList<string>();
using(XpsDocumentxpsSourceDocument
= newXpsDocument(fileToDecollate,
FileAccess.Read))
FixedDocumentSequencefixedDocSeq
= xpsSourceDocument.GetFixedDocumentSequence();
intpageNumber = 0;
foreach(DocumentReferencedocReference
infixedDocSeq.References)
FixedDocumentsourceFixedDoc
= docReference.GetDocument(false);
foreach(PageContentpage
insourceFixedDoc.Pages)
pageNumber++;
// prepare new fixed doc sequence
FixedDocumentSequencenewFixedDocSeq
= new
FixedDocumentSequence();
DocumentReferencenewDocReference
= new
DocumentReference();
FixedDocumentnewFdoc
= new
FixedDocument();
newDocReference.SetDocument(newFdoc);
// copy the page
PageContentnewPage =
new
PageContent();
newPage.Source = page.Source;
(newPage asIUriContext).BaseUri
= ((IUriContext)page).BaseUri;
// tickle this method... presumably just to load the FixedPage data.
FixedPagenewFixedPage
= newPage.GetPageRoot(false);
// Add page to fixed doc sequence.
newFdoc.Pages.Add(newPage);
// Always do this last: add document reference to fixed doc sequence.
newFixedDocSeq.References.Add(newDocReference);
// create and save new XPS doc
stringdecFileName =
Path.Combine(outputPath,
Path.GetFileNameWithoutExtension(fileToDecollate)
+ "~"+ (pageNumber).ToString()
+ FileExtensions.XPS);
if(File.Exists(decFileName))
File.Delete(decFileName);
XpsDocumentnewXPSDoc
= new
XpsDocument(decFileName,
FileAccess.ReadWrite);
// testing. thread IDs should be the same.
//Debug.Assert(System.Windows.Threading.Dispatcher.CurrentDispatcher.Thread.ManagedThreadId == newFixedDocSeq.Dispatcher.Thread.ManagedThreadId);
XpsDocument.CreateXpsDocumentWriter(newXPSDoc).Write(newFixedDocSeq);
newXPSDoc.Close();
// add file to list
xpsDecFiles.Add(decFileName);
returnxpsDecFiles;I have opened a support case with Microsoft through my employer. I'm convinced there is some .NET framework code that is not thread safe. I did put together a test harness app that demonstrates the problem (within 30 seconds or so after
you start it) and I sent that to MS support. They're looking into it. Anyone else who is curious can download the sample project here:
https://skydrive.live.com/redir?resid=5CBB4B55BCCB2D67!443&authkey=!AGEnR3CKrXUU6E0
Bradley
Bradley P. -
Thru OEM get list of queries and their schemas that accessed my objects
Hi,
I have a list of objects on my schema and i need to track the list of sql queries by different users that accessed by object during this time period.
i haven't enabled any auditing yet.
is there any way i can get that list of queries and their schemas that accessed those particular objects during a particular time period through OEM.
Can someone guide me please.
Thanks in advance.
Philip.create a name property in your class and assign a name property to your instances (either in the contructor) and/or using getters/setters. (you'll need a getter anyway.)
Maybe you are looking for
-
I need to import some Hi8 tapes into FCP-X. I have a Digital 8 Sony handycam and it is fine with importing all tapes other than my old Hi8 tapes into FCP-X. Any ideas how to import the Hi8 tapes into FCP-X?
-
Report Builder 3.0.5.8.0 using a servlet
hi I am trying calling the Reports server using a servlet. i need to find if i get a confirmation from the reports server that the report is generated. In which case I would be able to throw the same to the browser. Naresh
-
Hi everybody, I want to extract a row from a database DB2. This row containt a BLOB column. I want to extract this column but i cann't do it !!! Why???? here is the code: while (rs.next()) recCount++; System.out.println("Number of records = "+recCoun
-
Mass processing MC94 without LSMW?
Hi, I'm trying to find a way to mass process MC94 without using LSMW. We do not want to give authorization to end users for transaction LSMW, therefore I need another solution. I already tried CATT, but somehow that doesn't work either. I might also
-
Java VM Please help, Cannot remove and cannot Reinstall.
hello, I hope somebody can help me out here, I'm at my wits end. First of all I have xp pro file system NTFS, I have AOL DSL Broad band. I have attempted to get my Java Download DAYS ago and something went terribly wrong. After the download I noticed