Generating EJB Automatically
Guys,
I have a doubt regarding EJBGen and Workshop/WebLogic Server.
I would like to generate automatically some EJBs.
I have a DataSource working that points to a DataBase SQL Server. There are some Tables there that I would like to produce some EJBs.
How can I do that?
Is it possible to do by Eclipse Workshop? Or is it possible to do with a script? Maybe and ant script using ejbgen?
How to do it?
Thanks,
Hi Daniel,
Unfortunately this is Not Possible in WebLogic/Workshop... to genarate the EJB2.x Style Entitybeans from an Existing DataBase. But it is Possible in EJB3...But for that u need to a Persistence API and tools like (KODO/TopLink/Hibernate)..Then we have an Option from Workshop to Create a Persistence Unit mapped to the database.
But There is a Feature available in Sun Application Server along with "NetBeans" Utility to Generate CMP2.x Style of Bean from from an existing database in fraction of Seconds. U can Generate The Entity Beans from NetBeans and then With a Small modifications in the Deployment Descriptors you can Deploy those entities in WebLogic.
Thanks
Jay SenSharma
http://jaysensharma.wordpress.com (WebLogic Wonders Are Here)
Similar Messages
-
How to generate PDF automatically.
Hello,
I am generating INVOICES using REPORTS 6i.
After created the PDF format, I send to the customer by email.
I would like to do this process automatically.
So how can I generate PDF automatically?
There is any pl/sql functionality available to generated PDF automatically.If so how can I generate similar like report 6i format and symbols (Logo).
Pls give me some ideas.
Thanks,Kannan.KKannan,
a scheduler is part of Reports, with which you can automate to generate Reports. There's a Queue Manager with your installation. But for this you need Application Server based Reporting - not Client/Server.
Also it's possible to send an PDF-Report as an EMail-attachment directly. Starting with 9i there's also an PL/SQL-API available (Event-based Reporting).
regards
Rainer -
Using JarSettings to generate EJB client jar, but supported classes missed
Appreciated for any comments in advance.
I am using @jarSetting to generate EJB client jar file from workshop 9.2. The remote method of EJB has one input parameter that is defined as an interface. The interface is included in client jar, but the implementation of this interface is not.
Please advise how I can add the implementation of this interface to client jar?
Best Regards,
JamesHi James,
I believe the algorithm for creating the client jar is to simply inspect the EJB interfaces using reflection and to include all user defined classes and exceptions that are referenced by the interfaces. In your case, it sounds like a class is not being included because it is not directly referenced by one of the EJB interfaces.
I think the client jar creation algorithm can be described as "best effort" and unfortunately, it does not always end up including all classes needed by the client. I would recommend you add the additional classes manually using the jar tool.
- Matt -
Anyone know of a tool for auto generate EJB from DB
Does anyone know of a tool that connects to a DB and auto generates EJBs from the table schema, either CMP or BMP. Perhaps allowing you some control over choosing the table, pk, etc.
THANKSVisual Age for Java (IBM)
Websphere Studio Application Developer (IBM)
I think JBuilder has this option now. Is JBuilder still free? -
Generate Reports Automatically From Report Server
Hi all,
Can anyone please give me some clues on how to generate reports automatically from report server? e.g. generate daily sales reports on everyday 11:00pm.
Thank you.You can use scheduling feature of reports.
You need to give in cmd line
schedule=schedule_param
Refer in [ Publishing reports to web - 10G ] (see link below)
the command line param - "schedule"
http://download-uk.oracle.com/docs/html/B10314_01/pbr_cla.htm#641338
[ All Docs for all versions ]
http://otn.oracle.com/documentation/reports.html
[ Publishing reports to web - 10G ]
http://download.oracle.com/docs/html/B10314_01/toc.htm (html)
http://download.oracle.com/docs/pdf/B10314_01.pdf (pdf)
[ Building reports - 10G ]
http://download.oracle.com/docs/pdf/B10602_01.pdf (pdf)
http://download.oracle.com/docs/html/B10602_01/toc.htm (html)
[ Forms Reports Integration whitepaper 9i ]
http://otn.oracle.com/products/forms/pdf/frm9isrw9i.pdf
--------------------------------------------------------------------------------- -
Generating .gg automatically?
Hi,
just wondering if the interface file .gg can be generated automatically by parsing the c file or header. I realize you can change function names and massage types in the .gg, but if you don't need any of that, a tool like swig would be able to generate .gg automatically? I'd like to know what considerations are inovolved around spec'ing the interface automatically or manually.
Thank you.Hi,
take a look at the Information Broadcasting. It is possible to destribute content by email.
http://help.sap.com/saphelp_nw04s/helpdata/en/a5/359840dfa5a160e10000000a1550b0/frameset.htm
http://help.sap.com/saphelp_nw04s/helpdata/en/eb/0cfa40fe14f523e10000000a155106/frameset.htm
Regards
Andreas -
Tool to generate code automatically
Is there any java tool which can generate code automatically?
haison8x wrote:
Is there any java tool which can generate code automatically?As long as you can specify the requirements better than you have in this thread then http://www.rentacoder.com/RentACoder/default.asp . -
Generate EJB using Eclipse.
How do i write the EJB application in Eclipse? I mean which all classes do I have to write?
So if i write 1 class the others will get created
automatically in XDOClets?I think you have to write a bit more than one class, but all the interfaces will be generated yes. Look at tutorials, they are prettyeasy and straight forward. -
Closing the report generating engine automatically
how can i close the report generating engine after displaying a report automatically ie when closing the report window the report generating engine also need to be closed. now i have to manually close the report background window also and it becomes annoying to users . i am using the rdf files and not rep files.
There is a parameter ORACLE_SHUTDOWN. Set it to YES.
When you have large, complex reports, the Reports Background engine sometimes eats lots of memory and leads to GPF. If you have lots of GPF when running a report, you should use this parameter.
null -
How to generate username automatically while user creation in OIM.
Hi all,
Could you please send me steps for how to generate user name automatically by using adapter while creating the user in OIM.Follow this link:
[http://download.oracle.com/docs/cd/B32479_01/doc.903/b32457/creadp.htm|http://download.oracle.com/docs/cd/B32479_01/doc.903/b32457/creadp.htm]
It will help you to make each adapter which you want but for this you'll have to create entity adapter. -
Appc generate ejb.jar error
Hi
I tried weblogic.appc (WL8 sp2) to generate a very simple stateless ejb, it
has warings when compiling:
java weblogic.appc trader.jarE:\Tmp\appcgen\statelessSession_mt9oui_HomeImpl.java:43: warning:
non-varargs call of varargs method with
inexact argument type for last parameter;
cast to java.lang.Class for a varargs call
cast to java.lang.Class[] for a non-varargs call and to suppress this
warning
"ejbCreate", null);
^
E:\Tmp\appcgen\statelessSession_mt9oui_HomeImpl.java:47: warning:
non-varargs call of varargs method with
inexact argument type for last parameter;
cast to java.lang.Class for a varargs call
cast to java.lang.Class[] for a non-varargs call and to suppress this
warning
"ejbPostCreate", null);
^
2 warnings
then, when deploying it via WL console, it has exceptions:
Exception:weblogic.management.ApplicationException: prepare failed for
trader Module: trader Error: Exception preparing module:
EJBModule(trader,status=NEW) Unable to deploy EJB: statelessSession from
trader.jar: java.lang.AssertionError: Unable to find expected methods.
Please check your classpath for stale versions of your ejb classes and
re-run weblogic.ejbc at
statelessSession_mt9oui_HomeImpl.<clinit>(statelessSession_mt9oui_HomeImpl.j
ava:55) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method) at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcces
sorImpl.java:39) at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstruc
torAccessorImpl.java:27) at
java.lang.reflect.Constructor.newInstance(Constructor.java:274) at
java.lang.Class.newInstance0(Class.java:306) at
java.lang.Class.newInstance(Class.java:259) at
weblogic.ejb20.deployer.ClientDrivenBeanInfoImpl.prepare(ClientDrivenBeanInf
oImpl.java:974) at
weblogic.ejb20.deployer.EJBDeployer.setupBeanInfos(EJBDeployer.java:983) at
weblogic.ejb20.deployer.EJBDeployer.prepare(EJBDeployer.java:1283) at
weblogic.ejb20.deployer.EJBModule.prepare(EJBModule.java:477) at
weblogic.j2ee.J2EEApplicationContainer.prepareModule(J2EEApplicationContaine
r.java:29
Can any help?
Thanks
John woo
TorontoJohn,
"John Woo" <[email protected]> wrote in message news:[email protected]...
Thanks lots, Slava .
U r right, now instead of using javac, I'm using jikes, which is good for
all jdk.The problem is that your Java runtime may be still 1.5, so you may get other
strange errors. I don't think you will need 1.5 for a while, at least to develop
apps under weblogic. You may want to review your environment settings.
HTH.
Regards,
Slava Imeshev
>
>
>
>
John Woo
Toronto
"Slava Imeshev" <[email protected]> wrote in message
news:[email protected]...
Hi John,
Make sure that you are using JDK 1.4.2, not 1.5.x. You may know your javaversion by
running this command:
java -version
Hope this helps.
Regards,
Slava Imeshev
"John Woo" <[email protected]> wrote in message
news:[email protected]...
Hi
I tried weblogic.appc (WL8 sp2) to generate a very simple statelessejb, it
has warings when compiling:
java weblogic.appc trader.jarE:\Tmp\appcgen\statelessSession_mt9oui_HomeImpl.java:43: warning:
non-varargs call of varargs method with
inexact argument type for last parameter;
cast to java.lang.Class for a varargs call
cast to java.lang.Class[] for a non-varargs call and to suppress this
warning
"ejbCreate", null);
^
E:\Tmp\appcgen\statelessSession_mt9oui_HomeImpl.java:47: warning:
non-varargs call of varargs method with
inexact argument type for last parameter;
cast to java.lang.Class for a varargs call
cast to java.lang.Class[] for a non-varargs call and to suppress this
warning
"ejbPostCreate", null);
^
2 warnings
then, when deploying it via WL console, it has exceptions:
Exception:weblogic.management.ApplicationException: prepare failed for
trader Module: trader Error: Exception preparing module:
EJBModule(trader,status=NEW) Unable to deploy EJB: statelessSession from
trader.jar: java.lang.AssertionError: Unable to find expected methods.
Please check your classpath for stale versions of your ejb classes and
re-run weblogic.ejbc at
statelessSession_mt9oui_HomeImpl.<clinit>(statelessSession_mt9oui_HomeImpl.j
ava:55) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method) at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcces
sorImpl.java:39) at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstruc
torAccessorImpl.java:27) at
java.lang.reflect.Constructor.newInstance(Constructor.java:274) at
java.lang.Class.newInstance0(Class.java:306) at
java.lang.Class.newInstance(Class.java:259) at
weblogic.ejb20.deployer.ClientDrivenBeanInfoImpl.prepare(ClientDrivenBeanInf
oImpl.java:974) at
weblogic.ejb20.deployer.EJBDeployer.setupBeanInfos(EJBDeployer.java:983)at
weblogic.ejb20.deployer.EJBDeployer.prepare(EJBDeployer.java:1283) at
weblogic.ejb20.deployer.EJBModule.prepare(EJBModule.java:477) at
weblogic.j2ee.J2EEApplicationContainer.prepareModule(J2EEApplicationContaine
r.java:29
Can any help?
Thanks
John woo
Toronto -
Generating report automatically.....
I have a reuirement from the users where in they have number of reports generally time bound, say previous week.
The solution they are looking out is to have these reports are generated automatically and sent via email to a specific group mailbox.
Can we achieve the above functionality in Business warehouse, if so how.
Note: I think we need to create a report manually by providing the date range and generating the report and exporting from SAP.
I am not sure whether there is any procedure of this the same automatically.
your inputs will be appreciated.Hi,
take a look at the Information Broadcasting. It is possible to destribute content by email.
http://help.sap.com/saphelp_nw04s/helpdata/en/a5/359840dfa5a160e10000000a1550b0/frameset.htm
http://help.sap.com/saphelp_nw04s/helpdata/en/eb/0cfa40fe14f523e10000000a155106/frameset.htm
Regards
Andreas -
Urgent: Need to know a Program name which generates Numbers automatically
Hi Peers,
We all know that there are 2 kinds of Numbering :
1. Internal Numbering
2. External Numbering
For eg: When we create an Sales Order a new SO number is generated automatically which is called Internal number generation.
There is an Object which generates this number I would like to know that Program. If any Idea please let me know.
The reason why I need is , Thru a transaction when we are create entries for an Z table , the number should be generated automatically.
Points will be suitably rewarded.
Thanks a Lot.
DanielHi,
1) Goto Tcode SNRO
2) select ur concerned OBJECT there.
3) Click on Number Ranges Push Button.
4) then click on Display Interval Button over there.
*****************************************************Other code
Create number range object using OYSN.
Then call the following function modules.
FORM get_next_id CHANGING p_discrep.
DATA: last_id LIKE zrecaudit-discrep,
quant LIKE inri-quantity, "dummy
code LIKE inri-returncode. "returncode
CALL FUNCTION 'NUMBER_RANGE_ENQUEUE'
EXPORTING
object = 'ZRECAUDIT'
EXCEPTIONS
foreign_lock = 1
object_not_found = 2
system_failure = 3
OTHERS = 4.
IF sy-subrc = 0.
CALL FUNCTION 'NUMBER_GET_NEXT'
EXPORTING
nr_range_nr = '01'
object = 'ZRECAUDIT'
IMPORTING
number = last_id
quantity = quant
returncode = code
EXCEPTIONS
interval_not_found = 1
number_range_not_intern = 2
object_not_found = 3
quantity_is_0 = 4
quantity_is_not_1 = 5
interval_overflow = 6
buffer_overflow = 7
OTHERS = 8.
CALL FUNCTION 'NUMBER_RANGE_DEQUEUE'
EXPORTING
object = 'ZRECAUDIT'
EXCEPTIONS
object_not_found = 1
OTHERS = 2.
ENDIF.
ENDFORM. " get_next_id
Don't forget to reward if useful..
Vasanth -
Weblogic7/examples/clustering/ejb Automatic failover for idempotent methods ?
This one should be easy since it is from the examples folder of bea 7 about
clustering.
Ref : \bea7\weblogic007\samples\server\src\examples\cluster\ejb
I am referring to the cluster example provided with the weblogic server 7.0
on windows 2000.
I deployed Admin server and 2 managed server as described in document.
Everything works fine as shown by the example. I get load balancing and
failover both. Too Good.
Client.java is using the while loop to manage the failover. So on exception
it will go thru the loop again.
I understand from the documentation that the stateless session EJB will
provide the automatic failover for Idempotent stateless bean
Case Failover Idempotent : ( Automatic )
If methods are written in such a way that repeated calls to the same method
do not cause duplicate updates, the method is said to be "idempotent." For
idempotent methods, WebLogic Server provides the
stateless-bean-methods-are-idempotent deployment property. If you set this
property to "true" in weblogic-ejb-jar.xml, WebLogic Server assumes that the
method is idempotent and will provide failover services for the EJB method,
even if a failure occurs during a method call.
Now I made 2 changes to the code.
1 . I added as follows to the weblogic-ejb-jar.xml of teller stateless EJB
<stateless-clustering>
<stateless-bean-is-clusterable>true</stateless-bean-is-clusterable>
<stateless-bean-load-algorithm>random</stateless-bean-load-algorithm>
<stateless-bean-methods-are-idempotent>true</stateless-bean-methods-are-idem
potent>
</stateless-clustering>
So I should get the automatic failover .............
2. Also I added the break statement in the catch on line around 230 in
Client .java
catch (RemoteException re) {
System.out.println(" Error: " + re);
// Replace teller, in case that's the problem
teller = null;
invoke = false;
break;
So that the client program does not loop again and again.
Now I compile and restart all my three servers and redeploy application (
just to be sure )
I start my client and I get a automatic load balancing between the server
which makes me happy.
But Failover ....?
I kill one of the managed application server in cluster at any particular
test fail point.
I expect the exception to be taken care automatically by error/failover
handler in the home/remote stub
But the client program fails and terminates.
1. What is wrong with the code ?
2. Does the automatic failover with the indempotent methods also has to be
taken care by coding the similar while loop for stateless ejb ?
Your help will be appreciated ASAP.
Let me know if you need any thing more from my system. But I am sure this
will be very easy as it is from the sample code.........
Thanks
Sorry I meant to send this to the ejb newsgroup.
dan
dan benanav wrote:
> Do any vendors provide for clustering with automatic failover of entity
> beans? I know that WLS does not. How about Gemstone? If not is there
> a reason why it is not possible?
>
> It seems to me that EJB servers should be capable of automatic failover
> of entity beans.
>
> dan
-
Hi,
I m working with Jdeveloper 10G and oracle 9IAS 9.0.3.
I ve deployed an Ejb module on 9IAS
I m now wondering how generate the EJB client jar (Stubs and interfaces )to access my EJB module from anywhere.
Any Idea?I found the answer.
specify the client jar name in the jar settings and the workshop will generate the client jar for you.
inlcude the client jar and the wlclient.jar in the remote client application.
Maybe you are looking for
-
Problem with freeze on Document forms
Hi all, i've a problem with freeze on document's forms (like invoice) when i make changes on matrix. For example i've an addon that calculate discounts for items and update the information in the matrix. But when I update the info in the Matrix I see
-
Some help required - creating an election simulator
Hey there, i've only been coding java for the past month or so, and I've been going fine apart from this program i'm attempting to code (badly, I admit); To sum it up: *The program asks the user how many people are in a country. *The program asks the
-
I started firefox this morning just like normal, I didn't change ANYTHING on firefox or on my computer. Now all my bookmarks were randomly erased, and now Hulu is not working. This is the error message from hulu: "It appears that software on your com
-
Saving a pic or video sent via text
I'm unable to save pics or videos that are sent to me via text message from other people. I have tried the "tap and hold" method but the only options I get are to Open, Delete, or View. Save is not an option. Am I doing this wrong?? Thanks!
-
Bug in Aggregate Persistence Wizard with multiple hierarchies
Hi, Let's say you have a dimension with 2 hierarchies. In example: product -> subcategory -> category -> all products product -> subtype -> type -> all products Then you run the "Aggregate Persistence Wizard" and generate the code for 2 aggregations,