Using a beehive control from within an EJB2 MDB - weblogic.developer.interest.webservices.general(Archived)

I would like to use a custom beehive control from within the onMessage() callback of an old-school message-driven bean (using WL 10 and Workshop). I can't seem to figure out how to do it. I've tried:<ol><li>adding the beehive-related facets to the EJB project, but I didn't find a way to do it.<li>instantiating one declaratively, but without the builders on the project, it failed.<li>programatically instantiating a control, but never got one created. </ol>I've seen [url http://beehive.apache.org/docs/1.0.1/controls/containment.html]references in the beehive documentation to EJB containers being valid Control Client Containers, but I've not found an example of how to do it. This one little snag is keeping my otherwise pristine and glorious 8-) architecture from being possible.
<p>
I would appreciate any assistance or advice anyone can provide.
Thank you!
--
Edited by dtiller at 06/05/2008 8:28 AM

Related

how to  run java mail program using jsp?

Hi,
plz check it below link:
I put the .jsp file within my root directory folder
http://www.oracle.com/technology/sample_code/tech/java/jsps/ojsp/sendmail/usingjavabean/InputsForm.jsp.html
http://www.oracle.com/technology/sample_code/tech/java/jsps/ojsp/sendmail/usingjavabean/SendMail.jsp.html
I put the javabean in myrootdirectory/WEB-INF/classes folder
http://www.oracle.com/technology/sample_code/tech/java/jsps/ojsp/sendmail/usingapi/SendMailBean.java.html
I have an error whenever running the InputsForm.jsp .
I have to add any jar files.
can u give any idea about this.
Anybody Can u help me.
Thanx 
The JavaBean is not correct. In a J2EE container you're not allowed to create a
resource the usual/standalone way.
Instead you should configure your OC4J instance for the mail provider and
use JNDI lookup to get this resource (see the J2EE Tutorial for an example). 
Hi, oheimbur:
The JavaBean is not correct. In a J2EE container you're not allowed to create a resource
the usual/standalone way.If you meant that resources, even a java mail provider, had better to be managed in a serious production environment, OK, I won't object too much. If you meant it is not allowed, hmm, I would believe you have been misguided.
What user495519 described above is a way to send email that is simliar to the sendmail bean and tags that were developed and documented by oracle jsp team. I won't say that is a prefered way to send email when you just want do things quick and dirty and efficient, but I do use that for several years now in our internal oracle server for j2ee group, which is, of course, nothing but an oc4j of some public release. 
user495519:
what kind of error messages? 
Hi qlin,
I don't think that I'm misguided.
For me The J2EE 1.3 specification J2EE.6.9 JavaMail™ 1.2 Requirements is very clear:
"Configuration of the JavaMail API is typically done by setting properties in a
Properties object that is used to create a javax.mail.Session object using a
static factory method. To allow the J2EE platform to configure and manage
JavaMail API sessions, an application component that uses the JavaMail API
should request a Session object using JNDI, and should list its need for a Session
object in its deployment descriptor using a resource-ref element. A JavaMail
API Session object should be considered a resource factory, as described in
Section J2EE.5.4, “Resource Manager Connection Factory References.” This
specification requires that the J2EE platform support javax.mail.Session objects
as resource factories, as described in that section."
Keeping in mind that "should" usually means "must" in specifications and standard
texts, I consider this as a requirement.
The same is true for J2EE 1.4 (J2EE.6.8). 
Hi, oheimbur:
I thought I replied ealier, but I missed it. So I write my reply here again.
The J2EE 1.3 specification J2EE.6.9 JavaMail™ 1.2
To allow the J2EE platform to configure and manage
JavaMail API sessions, an application component that uses the JavaMail API
should request a Session object using JNDI, and should list its need for a Session
object in its deployment descriptor using a resource-ref element.This is exactly part of the reasons why I said, "If you meant that resources, even a java mail provider, had better to be managed in a serious production environment, OK, I won't object too much". Please note that I do not think the above quote is equivalent to "To use the JavaMail API, an application component should request a Session object using JNDI, and should list it need for a Session ...".
Just for the sake of argument, let us assume they are equivalent. Then I would not interpret the "should" here as a "must". You can try to google "jsp mail tag" and take a look at the result. Then tell me if you still think the J2EE expert groups would outlaw those usage of JavaMail API in jsp tags, including Email Web Application Using JSP Tag Libraries from Sun Developer Network. I do not think so. I believe J2EE platform should not prevent people from doing something quick and dirty but quite safe and sound. The guideline of J2EE platform should be something like: "Here are some services and recommended ways to do things. However, if you do not care for them and you would like to do it in some other way, please go ahead as long as it does not interfere with others." Hmm, that is simliar to the philosophy of an ideal government.
Last but the not least, the above-mentioned way of sending mail by JavaBean or JSP tags without requesting a Session object using JNDI does work in all versions of oc4j.

WebLogic and CORBA Portable Interceptors

Hello Everyone.
I am having a problem with BEA WebLogic. Let me describe the problem:
Problem Description:
What I need is to pass some arbitrary piece of data between the RMI client and server, so I want to inject the data on the client and retrieve it on the server (the ultimate goal being able to trace transaction flow across multiple app servers)
CORBA Portable Interceptors fit the bill perfectly and are designed for that specific purpose. The interceptors are CORBA standard and were added to J2EE 1.4 standard. Sun own ORB, IBM WebSphere and JBOSS all support Portable Interceptors.
WebLogic does not :(
I looked at WebLogic documentation and could find no replacement for interception of RMI flow. The last resort is code instrumentation, but I really want to avoid that since I have to support J2SE 1.4 code that is prior to javaagent.
Has anyone ever implemented something similar for WebLogic (v8.1 and up) or can point me to any feature of the product that can help me?
--
Edited by sharonbn at 02/07/2008 6:33 AM 
Sharon Ben Asher <> writes:
I never got around to implementing PI's. It was a question of PI or
POA and POA won. In 9.x and onwards you can use WorkContext to
transfer data out-of-band between client and server. This is supported
in both t3 and iiop and sounds like it would do what you
wnt. WorkContext is used internally for doing the kind of tracing you
are talking about.
andy
Hello Everyone.
I am having a problem with BEA WebLogic. Let me describe the problem:
Problem Description:
What I need is to pass some arbitrary piece of data between the RMI client and server, so I want to inject the data on the client and retrieve it on the server (the ultimate goal being able to trace transaction flow across multiple app servers)
CORBA Portable Interceptors fit the bill perfectly and are designed for that specific purpose. The interceptors are CORBA standard and were added to J2EE 1.4 standard. Sun own ORB, IBM WebSphere and JBOSS all support Portable Interceptors.
WebLogic does not :(
I looked at WebLogic documentation and could find no replacement for interception of RMI flow. The last resort is code instrumentation, but I really want to avoid that since I have to support J2SE 1.4 code that is prior to javaagent.
Has anyone ever implemented something similar for WebLogic (v8.1 and up) or can point me to any feature of the product that can help me?
--
Edited by sharonbn at 02/07/2008 6:33 AM 
thx Andi, for the prompt reply.
Am I to understand from your response that you are the actual designer/developer who integrates CORBA features in WLS? cool...
well, I hope you get around to implement PI's in WLS in the near future, as it is a benefitial feature and will allow folks like me to implement our solutions based on standards, instead of having to tailor for each app server vendor.
I briefly looked at WorkContext. It seems that it is indeed designed for the tracing I am looking for. However, there is one major diff from PI's - invocation. Work Context has to be typed inside the client's and server's code. PI's get invoked by adding VM arguments. For me, that's a major diff.
Is there a way to add WorkContext w/o changing app code?
--
Edited by sharonbn at 02/10/2008 2:24 AM 
Sharon Ben Asher <> writes:
thx Andi, for the prompt reply.
Am I to understand from your response that you are the actual designer/developer who integrates CORBA features in WLS? cool...Yes.
well, I hope you get around to implement PI's in WLS in the near future, as it is a benefitial feature and will allow folks like me to implement our solutions based on standards, instead of having to tailor for each app server vendor.I don't work on WLS anymore, so its unlikely.
I briefly looked at WorkContext. It seems that it is indeed designed for the tracing I am looking for. However, there is one major diff from PI's - invocation. Work Context has to be typed inside the client's and server's code. PI's get invoked by adding VM arguments. For me, that's a major diff.
Is there a way to add WorkContext w/o changing app code?Fair point - it is a user oriented API.
andy 
for some reason, I cannot see the "assign reward point icon", thx anyway.

how to create web service without WL help

Hello. I am trying to create a web service that fronts an ejb, but i'd like to do it without having to use web logic to generate a lot of code, is that possible?
Ideally i'd like like to use an ant not installed as part of web logic, but i would be willing to use the ant tasks to do some of the work if that needs to be done. I haven't been able to find anything that says 'do this to create a web service from an ejb' that does it outside of the weblogic envirnment.
The machine that this gets built on most likely won't have weblogic installed, but the needed jars could be made available. Any help is greatly appreciated.
thanks,
edward 
The standardized way to do this is coming in EJB2.1, that is a way that will work on all J2EE servers. Until then, each server environment has it's tools for exposing an EJB as a webservice. If you don't want to be dependent on anyone's toolset, then you could write the whole thing yourself (parse and handle the SOAP messages and communications yourself) but that would be very time consuming to do and to get right (you'd be duplicating the work that the server vendors are doing for you now). 
Ok, that confirms what my testing seemed to reveal.
Well is there a way to get ant 1.6.1 to work with the web logic tasks? I have defined them in my build.xml file but when i try to compile one of the examples i get the following message :
source2wsdd: Cannot find doclet class weblogic.webservice.tools.ddgen.ServiceGen
The classpath contains weblogic.jar and webservices.jar.
My problem is that the build environment most likely won't have WL installed, but the jars can be made available. We are using ant 1.6.x. I am trying to keep it as generic as possible so the same EJBs can be used on various app servers, and just do what i need to do to get the web service part working. Is this possible/feasible?
thanks,
edward 
Ah, unfortunately I cannot answer that one right away myself. It'd probably be best to check with the webservices newsgroup:
http://forums.bea.com/bea/forum.jspa?forumID=2055
For a timely answer.
-thorick 
"edward winston" <noaddress#noaddress.given> wrote in message
My problem is that the build environment most likely won't have WL installed, but the jars can be made available. We are usingant 1.6.x. I am trying to keep it as generic as possible so the same EJBs can be used on various app servers, and just do what i
need to do to get the web service part working. Is this possible/feasible?
>
I think it's not possible unless you use 3rdparty web tools.
Regards,
Slava Imeshev

Working without the split structure

My company has me looking at ways to deploy our existing web application on Weblogic for a client, but we have a fair amount of investment in development and build infrastructure already, such that we cannot justify reorganizing the current app in order to make it into the split structure recommended by BEA. Specifically, we have it in a standard Eclipse structure, built by custom build scripts and ant calls... Frankly, I'm new here and don't fully understand the build setup, but I know enough to know that we can't make this shift.
So, how can I get weblogic working? We need to have A) EJBs and B) some web services based off of those EJBs. To my knowledge, we are not creating any servlets or JSP pages, so those are irrelevant. Right now we are deploying on JBoss, and much of the descriptor generation is being done with xdoclet.
I'm more or less 100% new to this sort of Java development, in addition to being new to weblogic (it's an internship) so I could really use a few pointers.
Thanks! 
A bit more...
I guess by way of explanation of the task that I'm trying to accomplish:
What I'm doing is providing a proof of concept that the EJB setup that we use -- with the xdoclet generation et al -- can be migrated to Weblogic. In order to accomplish that, I want to create a simple EJB, a stateless session bean that works with it, and a web service that exposes a method on that bean. Once I have all of those, I then need to confirm that all the grotty details I worked out by hand can be automated with xdoclet.
Any advice that anyone here can offer me would be great. I have the weblogic server running and a datasource set up, and a user that I can use to authenticate. Beyond that, I have written said simple EJB and session bean, and they work to my satisfaction.

Is it possible to call out to EJB deployed in WebLogic  from Java Stored Procedure?

Any guru there:
Is it possible to call out to an stateful session bean which is deployed in WebLogic 6.1 applicaiton server from a Java Stored Procedure in Oracle 9i release2?
Which EJB client libraries should I load into the Oracle database 9i2, in order to use either RMI/IIOP or T3(BEA)?
What security settings should I change? Through SYS?
Any sample, link, books will be highly appreciated!
Much thanks,
Charles 
In page 14 of PDF documentation of "Unleash the Power of Java Stored Procedures" of Oracle9i2, there's a procedure of calling-out EJB in OC4J. It says the complete code will be posted on the Oracle OTN Web site. I've spent a whole day trying to dig out that "complete code" from OTN, but couldn't find any.
Please give me some help if anyone know a link to there!
Also, in e-seminar of Oracle 9i2, the capability of calling out to EJB from Java Stored Procedure is highlighted as an important new feature. Therefore I'm trying to find a practical example from samples of Java Stored Procedure or documentations ... just lost in OTN. Please help!
Much thanks again!
Charles 
In page 14 of PDF documentation of "Unleash the Power of Java Stored Procedures" of Oracle9i2, there's a procedure of calling-out EJB in OC4J. It says the complete code will be posted on the Oracle OTN Web site. I've spent a whole day trying to dig out that "complete code" from OTN, but couldn't find any.
Please give me some help if anyone know a link to there!
Also, in e-seminar of Oracle 9i2, the capability of calling out to EJB from Java Stored Procedure is highlighted as an important new feature. Therefore I'm trying to find a practical example from samples of Java Stored Procedure or documentations ... just lost in OTN. Please help!
Much thanks again!
Charles well, it is possible to call-out EJBs from within the database using RMI/IIOP or RMI/ORMI (Oracle9iAS's proprietary transport protocol - similar to BEA's T3) but the reason we have not published this How To is that
beyond a proof of concept, we found an issue with subsequent calls, that prevents it's use in production environment. We cannot publish a paper and in the same time tell people to not use it in production environment. The current workaround is to call-out a servlet that in his turn calls a colocated EJB; it works and it is fast. I have also seen an indirect way of doing this: consisting in deploying EJB proxies in the database as old fashioned RMI servers (these proxies in their turn interact with the EJB). Sorry for this inconvenience.
Kuassi 
Kuassi,
You have just shown me something I didn't know, namely:
"RMI/ORMI (Oracle9iAS's proprietary transport protocol)"
Well, I'm sure the guys at IronFlare will find that interesting as
well. You have made them see reality, after living under the false
impression for all these years that it was their proprietary protocol
(or is there something I'm unaware of?).
Cheers,
Avi.

Categories

Resources