How to master good design with EJB and JSP?
I use JSP to calling EJB. But the .jsp file is complex and it's difficult to maintain...I just want to work higher efficent with EJB,JSP and JavaBean. I want to know is there a good design with EJB and JSP? and is there any good material about MVC for EJB,JSP and JavaBean?
You should read the J2EE blueprint available on this website. Better download the PDF, and print it for yourself so you can read it anytime.
Similar Messages
-
How to use Java WebStart with EJB ?
hi forum...
how to use Java WebStart with EJB ? examples ?
thanks
minduGreetings,
hi forum...
how to use Java WebStart with EJB ? examples ?Well, for starters these are complementing, not 'cooperating', technologies. I presume, since EJB's do not - directly, at least - communicate with a web browser, that you intend for "Java WebStart" to somehow invoke an EJB?? Java WebStart is a technology for running client-side (Java) applications from the web browser - perceptively, the application resides on the server, but technically it, like an applet, is downloaded to the client and run there. Unlike an applet, however, it is not constrained by "sandbox" restrictions and does not have to be re-downloaded each time it is invoked - though the process allows for automagically updating the client-side with new versions of the application. ;) So, with this in mind, to "use Java WebStart with EJB" means little more than deploying an EJB client application with Java WebStart as the distribution channel.
thanks
minduRegards,
Tony "Vee Schade" Cook -
When I design with Muse and export as HTML Dreamweaver doesn't attach the style sheets when I open the files with Dreamweaver. Essentially when I design with Muse the files don't render the same with Dreamweaver. Is this a bug? Any work arounds?
Then you will have to install a local server and use live view. It's not that DW isn't rendering it or isn't attaching it, it's that Muse decided to use server-side processing to include it which is ok for a CMS practice when you are combining stylesheets for better caching, but it really isn't ideal for a single style sheet. This is a shortcoming of Muse and one of the reasons many professionals don't back the product at the moment. That and you can't actually buy Muse, so unless you are on a subscription you don't have it. It's trying to fill a void for those who don't want to invest in the professional design tools like Fireworks or Photoshop or Dreamweaver, but want a cross between them to make designs. If you have invested in the subscription though and want a better way to make layouts I highly recommend coding it yourself and using Fireworks or Photoshop to do the layout for you. There is an excellent tutorial on the devnet (3 parts) to show you how its done ( http://www.adobe.com/devnet/dreamweaver/articles/dw_fw_css_pt1.html ). Once you start using Fireworks or Photoshop you will realize just how limited Muse is in design.
-
How can I start anew with Photos and clear the (minimal) stuff it has uploaded
I've about had it up to here with this new Photos scheme. I reorganised my Aperture libraries on both my iMac and MBA in preparation for this, delayed turning Photos on for a couple of days until I thought everything was ready based upon the limited advice that was out there, and then got stuck in an endless loop of "uploading" and "preparing" every time I opened Photos. There are 19,975 images in my Aperture library on the iMac. I was stuck at Uploading at anywhere between that number and 19,000 with no progress after hours of waiting. I tried all the tricks mentioned here including re booting, restarting the app, repairing/rebuilding the database, killing the "cloudd" process, etc.today Today when I restarted Photos, it now said I had 23,775 images to upload- 4000
more than I have-and of course it got stuck there, like it has for the last week.
I copied the previous Aperture library (pre Photos migration)back to my iMac and opened it in Aperture. Thankfully, all the photos I had taken on my iPhone this week during this Photos clusterphuck transition were in the Aperture Stream so I didn't lose any of those. I'm willing to give this whole thing one more shot. So i need some advice. How can I start anew with Photos and clear the (minimal) stuff it has uploaded (about 6000 of 19,000 images in the last 7 days) ? If I simply delete the Photos.photolibrary file will that do the trick and lt me start a new fresh library using?
<Re-Titled By Host>How can I start anew with Photos and clear the (minimal) stuff it has uploaded (about 6000 of 19,000 images in the last 7 days) ? If I simply delete the Photos.photolibrary file will that do the trick and lt me start a new fresh library using?
It is hard to say from your post, why the migration did not succeed in your case.
by "stuck on upload" do you mean, you opened the Aperture library in Photos, and Photos converted it to a Photo Library, and then the upload to iCloud Photo Library did hang? Or did already the upgrade to the Photo Library fail?
If you want the Aperture library to upload to iCloud Photo Library, it needs to be on a disk formatted MacOS Extended (Journaled) and the original image files must not be referenced. Referenced originals will not upload.
Also, the upload may hang, if you do not have enough free iCloud storage, orr if one of the videos or photos in your library is in an unsupported format or corrupted.
To start over, try to repair and rebuild the Aperture library before opening it in Photos. Try all Aperture Library First Aid options - starting with repairing the permissions. (Repairing and Rebuilding Your Aperture Library: Aperture 3 User Manual)
If I simply delete the Photos.photolibrary file will that do the trick and lt me start a new fresh library using?
You will have to delete the photos that are already in icloud too; otherwise you are risking duplicates.
Can you launch Photos at all? If yes, delete all photos in Photos and empty the Recently Deleted album. Wait for the deletion to sync to iCloud. Then delete the Photos.photolibrary. -
i have a problem with mail. the spelling and grammer check box before sending the messege is no longer there. I did everything but cannot get it back. is ther anyone who knows how to get the box with spelling and grammer checks before sending the mail.
Also the mail is acting very funny by not getting the rules work in a proper method. Is ther a software to repair mail.i did both of them, but still the while sending the mail the diolog box is not showing up and also the spelling and grammer does not do the spelling check.
This problem just started for about 3 to 4 days now. earlier it was working normally. -
I already have a new book that is ready to publish as an iBook. In addition I also have an app prepared for this book.
Please tell me how to upload this book (title is: "How To Cope...with life") and the app for it into your iBook Authors app so I can have it offered for sale @$0.99, in your app store?
FROM: Terry Weber, Email: [email protected]https://itunesconnect.apple.com/WebObjects/iTunesConnect.woa/wa/bookSignup
-
Anyone know how to gernerate CRUD applications with flex and coldfusion?
Anyone know how to gernerate CRUD applications with flex and
coldfusion? I am working with a remote coldsfusion installation
with MS SQL and I don't have RDS.You might investigate "squidhead". It is CF based. I'm not
sure if it has any Flex related features.
http://squidhead.riaforge.org/ -
How to find index name with primarykey and column on a table?
Hi,
how to find index name with primarykey and column on a table?
please help me.
Thankyou.1 select ac.table_name, ac.index_name, aic.column_name
2 from user_constraints ac, user_ind_columns aic
3 where ac.constraint_type = 'P'
4 and ac.index_name = aic.index_name
5* order by 1,2,3
SQL> /
TABLE_NAME INDEX_NAME COLUMN_NAME
ACTION_TABLE SYS_C0011033 NESTED_TABLE_ID
ACTION_TABLE SYS_C0011033 SYS_NC_ARRAY_INDEX$
CATEGORIES_TAB SYS_C0011038 CATEGORY_ID
CUSTOMERS CUSTOMERS_PK CUSTOMER_ID
INVENTORIES INVENTORY_IX PRODUCT_ID
INVENTORIES INVENTORY_IX WAREHOUSE_ID
LINEITEM_TABLE SYS_C0011034 NESTED_TABLE_ID
LINEITEM_TABLE SYS_C0011034 SYS_NC_ARRAY_INDEX$
ORDERS ORDER_PK ORDER_ID
ORDER_ITEMS ORDER_ITEMS_PK LINE_ITEM_ID
ORDER_ITEMS ORDER_ITEMS_PK ORDER_ID
PRODUCT_DESCRIPTIONS PRD_DESC_PK LANGUAGE_ID
PRODUCT_DESCRIPTIONS PRD_DESC_PK PRODUCT_ID
PRODUCT_INFORMATION PRODUCT_INFORMATION_PK PRODUCT_ID
PROMOTIONS PROMO_ID_PK PROMO_ID
WAREHOUSES WAREHOUSES_PK WAREHOUSE_ID
16 rows selected. -
just now i read some articles about EJB and it make me a little confused in what i have understood about EJB and JSP ( at least i thought i understood them, but now ....()
1. i found that in most JSP examples, the javabeans are used but not the EJB, right? so i have a qustion, an EJB can be used in JSP or not? and how if it can? why if it can not?
...still have a lot of question ....
thanks a lotHi,
1. i found that in most JSP examples, the javabeans
are used but not the EJB, right? so i have a qustion,
an EJB can be used in JSP or not? and how if it can?
why if it can not?It can be there for more of the examples,but you can invoke the EJB from the JSP also .Actual EJB is entirely the different concept whose foundation is build on the Distributed Technology.I advice you to read the Mastering EJB which is freely available at http://theserverside.com
before starting coding.The EJB is a vast concept and requires time and strong core foundation to understand,once it is clear then you understand it true potential...
...still have a lot of question ....You queries are welcome here!!!
regards
Vicky -
Creating FOrums with Servlet and JSP
Hi everyone,
Is there a good resource that explains how to build a forum using servlets and JSP technology?
Regards,
Basil Mahdiplease let me know here if you find any useful resources...I am in the process of writing my own searchable threaded forum for my company with JSP's/servlets. It's a very slow process at the moment though...if I ever finish it, I'll gladly share it.
-
Propagation of ctx between EJB and JSP
Hello,
Does anybody know how to propagate the Security
Context between EJB and JSP so that when I login in my JSP page the user will be after recognized in my EJB system ?
Thanks
Francescotry this...as a test..
take a simple Contact ejb (as simple as you can make it, just a name and email address). In the ejb-jar.xml set up a role, for example, user, and restrict the access to only this role for all methods.
try to access the ejb from a jsp, and you should get the login form identified in your web.xml file.
make sure that the ejb is noted in the web.xml file, also.
this should work...
no try this...identify a role in your web.xml file, (user, for example) and restrict the access to the a particular jsp which is not calling the ejb. IF you navigate to this jsp, you should get the login prompt...
this should work....
now the tough part
in your application.xml create a role with the same name, user. By doing this, you have created a global role, and connect the two together.
Now point your browser to the restricted jsp with no calls to the ejb...you should get the login, so login in.
now navigate to your jsp which is unrestricted, but calls the restricted ejb...
there should now be no login prompt.
This should work. -
Where do I get started with OAS and JSP ?
Where do I get started with OAS and JSP ?
Resources?
Please point me in the right direction!
Post and/or email me at [email protected]The simplest way is to read OAS4082 Documentation:
Developer's Guide: JServlet and JSP Applications. -
How to work with EJBs and database for a simple login application
Hi all :)
I am new in JSP,EJB and Servlets. I just wanted to develop a simple login application, using JSP+EJBand servlets. In some tutorial I found that the beans are already populatesd with database records. But will it be good logic to retrive all records into a bean and then search for a perticuler users data for authentication.
Can any one tell me me what is the best logic for doing so. :(
Thanx in advance.Himanshu.Shekhar wrote:
Hi all :)
I am new in JSP,EJB and Servlets. I just wanted to develop a simple login application, using JSP+EJBand servlets. In some tutorial I found that the beans are already populatesd with database records. But will it be good logic to retrive all records into a bean and then search for a perticuler users data for authentication.No. Let the database do the search. It's far more efficient.
% -
Help with EJB and JNDI, please
Hello. My name is Santiago, and i am a student from the University of Valladolid, in Spain. I am newcome in the world of EJB, I have done the first EJB from de Sun tutorial (I�m using the Sun Java System Application Server PE 8.2) and now I am trying to improve it in that way: I have the EJB and the client in diferent machines conected.
I am trying to understand how to use JNDI, but i have not good results :( I have read about using ldap but i dont know if it is apropiated, or if it is installed automaticaly with the sun aplication, or if i have to download and install it... i am not sure about anything :)
This is my client�s code (part of it)
Hashtable envirom = new Hashtable();
envirom.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
envirom.put("java.naming.factory.url.pkgs","com.sun.enterprise.naming");
envirom.put(Context.PROVIDER_URL,"iiop://Santiago:389");
envirom.put(Context.PROVIDER_URL,"ldap://192.168.1.101:389");
envirom.put(Context.SECURITY_AUTHENTICATION,"none");
InitialContext ctx = new InitialContext(envirom);
Object objref = ctx.lookup("java:comp/env/ejb/Multiplica");
When I try to connect in local mode (client and EJB in the same machine) i get something like that:
javax.naming.CommunicationException: 192.168.1.101:389 [Root exception is java.n
et.ConnectException: Connection refused: connect]
at com.sun.jndi.ldap.Connection.<init>(Connection.java:204)
at com.sun.jndi.ldap.LdapClient.<init>(LdapClient.java:118)
at com.sun.jndi.ldap.LdapClient.getInstance(LdapClient.java:1578)
at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2596)
at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:283)
It is even worse when i try it in different machines:
10-mar-2006... com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImp1<init>
ADVERTENCIA: "IOP00410201: <COMM_FAILURE> Fallo de conexion: Tipo de socket: IIOP_CLEAR_TEXT;
name of host: portatil; puerto: 3700"
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code:201 completed:No
Both SSOO are XP and I have disabled Firewalls.
PLEASE, if you colud help me It would fantastic, because I am in that trouble, i have tryed 1000 solutions but i am not able to understand it.
Hoping you can help me.
Santiago.This thread is now being followed up in:
http://swforum.sun.com/jive/thread.jspa?threadID=64092 -
Problem with EJB and JMS - Failed to obtain/create connection
hello ejb and jms programmers,
My problem is my topic MDB keep on retrieving the same message when there is a database connection failure. Maybe somebody could help me how to prevent to retrieve the same data?
Given:
- I purposedly turn off the pointbase database because im testing my error handling.
- Im using SJSAS 8 as my application server.
- My message Driven Bean of topic type.
- Im using CMP for my entity bean
Here is the scenario of whats happening - step by step:
1. A separate application publishes a message to JMS queue server
2. My MDB retrieves this message and do some processing then inserts a record (transaction history) in my database
3. But my db is turned off or down
4. My MDB sends a successful processing reply to the JMS queue server
5. Then i noticed that my server.log keeps on growing so when i opened it, the record was not inserted and printed the stacktrace below "RAR5117 : Failed to obtain/create connection. Reason : javax.transaction.SystemException" (complete stacktrace below)
6. I understand the cause of the stacktrace is because the DB is turned off. But what i dont understand is that my MDB keeps on reading the same message. Since my MDB is of topic type, isnt a topic MDB supposedly reads a message only once???
So my questions are:
1. how do i handle insert database error?
2. how can i stop my MDB from processing the same message?
3. any better suggestions?
Thank you in advance :)
leigh
*** more complete stack trace ***
[#|2005-01-09T15:35:57.097+0800|WARNING|sun-appserver-pe8.0.0_01|javax.enterprise.system.core.transaction|_ThreadID=17;|JTS5041: The resource manager is doing work outside a global transaction
javax.transaction.xa.XAException
at com.pointbase.xa.xaException.getXAException(Unknown Source)
at com.pointbase.xa.xaConnectionResource.start(Unknown Source)
at com.sun.gjc.spi.XAResourceImpl.start(XAResourceImpl.java:162)
[#|2005-01-09T15:35:57.167+0800|SEVERE|sun-appserver-pe8.0.0_01|javax.enterprise.resource.resourceadapter|_ThreadID=17;|RAR5027:Unexpected exception in resource pooling
javax.transaction.SystemException
at com.sun.jts.jta.TransactionImpl.enlistResource(TransactionImpl.java:185)
at com.sun.enterprise.distributedtx.J2EETransaction.enlistResource(J2EETransaction.java:360)
at com.sun.enterprise.distributedtx.J2EETransactionManagerImpl.enlistResource(J2EETransactionManagerImpl.java:303)
at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.enlistResource(J2EETransactionManagerOpt.java:115)
[#|2005-01-09T15:35:57.177+0800|WARNING|sun-appserver-pe8.0.0_01|javax.enterprise.resource.resourceadapter|_ThreadID=17;|RAR5117 : Failed to obtain/create connection. Reason : javax.transaction.SystemException|#]
[#|2005-01-09T15:35:57.227+0800|WARNING|sun-appserver-pe8.0.0_01|javax.enterprise.resource.resourceadapter|_ThreadID=17;|RAR5114 : Error allocating connection : [Error in allocating a connection. Cause: javax.transaction.SystemException]|#]
[#|2005-01-09T15:35:57.237+0800|SEVERE|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.ejb|_ThreadID=17;|EJB5071: Some remote or transactional roll back exception occurred
com.sun.jdo.api.persistence.support.JDODataStoreException: JDO77006: SQL exception: state = null, error code = 0.
NestedException: java.sql.SQLException: Error in allocating a connection. Cause: javax.transaction.SystemException
FailedObjectArray: [[email protected]5ac]
at com.sun.jdo.spi.persistence.support.sqlstore.impl.TransactionImpl.getConnectionInternal(TransactionImpl.java:1444)
at com.sun.jdo.spi.persistence.support.sqlstore.impl.TransactionImpl.getConnection(TransactionImpl.java:1339)Hi annie,
Wherever you are handling database transactions,
you'd not be able to create a Connection if database
is closed (I think you mentioned turning off the
database) then at this condition, you should
certainly throw a System level exception and stop all
processing with some meaningful flow to indicate a
failure (like display message on UI). Even
network problems are handled by exceptions... so I
don't see a reason why you didn't wrap it in the
first place.
Anyway, try handling specific exceptions rather than
the general Exception... this will give you a better
idea of what to do in case of an exception.Yes i know this. I am practicing this in my non-j2ee server applications. But the j2ee app im making, i just pass the db url in the descriptor and the app server automatically creates the connection for my app. So where would i put exception handling?
2. how can i stop my MDB from processing the same
message?Guaranteed delivery is not supposed to stop
processing. It will continue to process the message
after certain intervals till the message is
delivered. You shouldn't deliver it at all, if you
are able to detect that the database is off
The problem here is that my MDB automatically retrieves the message from the JMS queue server. Im not the one retrieving the messages manually.
My assumed behavior of topic MDB is once the a certain MDB retrieves a message it will not retrieve the same message anymore.
thank you in advance.
leigh
Maybe you are looking for
-
Iphone 4 not showing up in Iphoto 11
I just did the update to Iphoto 11 and now my Iphone isn't showing up. I can't import my photos. Any advice?
-
My Forms in Addon Installer Wizard
Hello everyone, I have managed to install my addon in SP01 using B1DE Tools. The problem is that I don´t know in which directory I have to copy my forms (created with Screen Painter) so they open when the addon initiates. I have copied them in the BI
-
Material Ledger Conversion in a Parallel Valuation Scenario
Hi All, I'm working in a scenario where the Material Ledger is already active (without multiple currencies - in other words, with the local currency). We would like to activate parallel valuation introducing a new currency type (group currency). We h
-
I've just opened existing files with CS4 for the first time, but they only display properly in Design view if Live View is enabled. With Live View turned off, it displays the right background color (as set in the css style sheet, not embedded) but no
-
Deployment - maintaining container loads
We are investigating changing our SNP network, and adding a location to represent the inbound port for ocean shipments. At this location, we will run deployment to determine which DC to send product to from the port. We will not be breaking contain