Carrito de Compras en Java EE
Carrito de Compras en Java EE
Carrito de Compras en Java EE
Facultad de Ingeniera
Divisin de Estudios para Graduados
Instituto de Clculo Aplicado
Trabajo Prctico #1
Autor: Jaime Soto
C.I.: 7.715.519
TAREA:
SOLUCIN:
El presente informe contiene:
1. Plataforma de desarrollo
2. Base de Datos
3. Estructura de la aplicacin
4. Aplicacin
5. Informacin de arranque del JBoss
Base de Datos
Driver para conexin con Hypersonic
IDE,
se
debe
modificar
el
archivo
\server\default\deploy\hsqldb-ds.xml
directorio
del
Servidor
de
en
Aplicaciones
el
JBoss.
crear
hsqldb.jar
una
conexin
que
se
JDBC
encuentra
con
en
el
el
driver
directorio
debe
asignar
el
siguiente
jdbc:hsqldb:hsql://localhost:1701,
el
URL
nombre
ENTIDAD
ATRIBUTOS
CLIENTE
Id
Usuario
Clave
CARTPRODUCTO
PRODUCTO INVENTARIO
Id
Nombre
Precio
Existencia
CARTCONFIG
CONFIGURACIN
Id
Numerofactura
CARTITEM
ITEM DE CARRITO
Id
Nombre
Precio
Cantidad
CARTFACTURA
FACTURA (Cabecera)
Id
Idfactura
Idcliente
Total
FACTURA (Detalle)
Id
Idfactura
Idcliente
Idproducto
Cantidad
Precio
CARTCLIENTE
CARTDETALLE
Si
se
correcta
realiza
de
estructura
la
de
diferente.
una
base
esta
De
normalizacin
de
sera
hecho
no
tendra
idcliente
que
este
la
seguramente
la
cartdetalle
ya
datos
tabla
el
se
campo
encuentra
carrito
no
se
almacenan
en
esta
contener
datos
importantes
nivel
de
configuracin,
tales
como:
IVA,
descuento a clientes, entre otros. Las tablas cliente, producto, factura y detalle
de factura se explican por s solas.
Descripcin
CartCliente.java
CartProducto.java
CartConfig.java
CartItem.java
CartFactura.java
CartDetalle.java
INTERFACES
COMPONENTES DE SESIN
CartClienteFacadeLocal.java
CartProductoFacadeLocal.java
CartConfiguracionRemoto.java
CarritoComprasRemoto.java
CartFacturaFacadeRemoto.java
COMPONENTES DE SESIN
TIPO
LOCAL
LOCAL
REMOTE
REMOTE
REMOTE
TIPO
Descripcin
Interfaz para componente de sesin sin
estado del cliente
Interfaz para componente de sesin sin
estado del producto
Interfaz para componente de sesin sin
estado de la configuracin
Interfaz para componente de sesin con
estado del Carrito de Compras
Interfaz para el componente de sesin sin
estado de Factura
Descripcin
CartClienteFacade.java
SIN ESTADO
CartProductoFacade.java
SIN ESTADO
CartConfiguracion.java
SIN ESTADO
CarritoCompras.java
CON ESTADO
CartFacturaFacade.java
SIN ESTADO
SERVLET
Descripcin
AccesoCliente.java
Pantalla
inicial
de
la
aplicacin.
Requiere de una clave para el ingreso al
sistema. Si la clave ingresada no es
correcta, le informa al usuario.
Carrito.java
ListaProductos.java
CarritoLimpio.java
CarritoFactura.java
SERVLET
Descripcin
AgregarCliente.java
ListaClientes.java
AgregarProducto.java
Application),
(componentes
ejb
directorio
de
sesin
CarritoApp-ejb
y
componentes
es
el
directorio
de
entidad)
del
mdulo
CarrtioApp-war
es
EJB
el
4.- APLICACIN
Antes
de
ejecutar
la
aplicacin,
debe
verificar
que
la
tabla
de
hay
que
agregarlo).
Los
mdulos
AgregarCliente
(browser)
al
http://localhost:8080/CarritoApp-
recurso
de
error
permite
el
regreso
la
anterior
pantalla
para
un
nuevo
intento.
El Carrito controla si se
cantidad del producto que se desea. Solamente un cdigo y una cantidad de producto
correcta permitirn que el item se agregue al Carrito. El Manejador de Inventario
verifica que la cantidad del producto requerida por el cliente no exceda la
cantidad en existencia para ese momento.
Una vez concluida la compra, en el momento que el cliente registra la compra,
el Manejador de Inventario descarga los productos del inventario, el Manejador de
Facturas genera la factura al Cliente y el Manejador de Configuracin actualiza el
progresivo de facturas. Si el Cliente desea realizar otra compra, puede hacerlo
sin tener que reiniciar la aplicacin.
elimina
los
productos
ingresados
previamente
permite
al
cliente
por
Los
el
items
se
servlet.
mantienen
Sin
en
embargo,
memoria
la
base
travs
de
datos
de
una
tiene
la
sesin
tabla
Esta pantalla muestra un carrito listo para facturar con todos los elementos
de identificacin: Cliente, Productos y Total de la transaccin.
Descarga de inventario y
generacin de factura
-Dhttp.proxyHost=
-Dhttp.proxyPort=
-Dhttp.nonProxyHosts="localhost|127.0.0.1|vertigo-01"
-Dhttps.proxyHost=
-Dhttps.proxyPort=
-Dprogram.name=run.bat -Xms128m -Xmx512m
-Dsun.rmi.dgc.client.gcInterval=3600000
-Dsun.rmi.dgc.server.gcInterval=3600000
CLASSPATH: C:\jdk1.5.0_06\lib\tools.jar;C:\jboss-4.0.4.GA\bin\\run.jar
/===============================================================================
22:29:42,343 INFO
22:29:42,359 INFO
22:29:42,375 INFO
22:29:42,375 INFO
22:29:42,375 INFO
22:29:42,375 INFO
22:29:42,375 INFO
22:29:42,375 INFO
22:29:42,640 INFO
22:29:42,640 INFO
22:29:42,640 INFO
22:29:43,546 INFO
22:29:43,546 INFO
22:29:43,546 INFO
22:29:45,734 INFO
22:29:48,250 INFO
22:29:50,687 INFO
22:29:51,687 INFO
22:29:56,375 INFO
22:29:59,796 INFO
22:30:01,625 INFO
[socket://127.0.0.1:3873/]
file:/C:/jboss-4.0.4.GA/server/default/deploy/ejb3-interceptors-aop.xml
RMI=/0.0.0.0:1098, backlog=50,
no client SocketFactory,
Server SocketFactory=class org.jboss.net.sockets.DefaultSocketFactory
22:30:01,687 INFO
22:30:02,750 INFO
22:30:02,843 INFO
22:30:02,859 INFO
22:30:03,515 INFO
22:30:03,515 INFO
22:30:03,515 INFO
22:30:03,578 INFO
22:30:03,609 INFO
22:30:03,968 INFO
22:30:04,546 INFO
22:30:05,484 INFO
22:30:06,031 INFO
22:30:07,562 INFO
warUrl=.../deploy/jbossweb-tomcat55.sar/ROOT.war/
warUrl=.../tmp/deploy/tmp36820jbossws-exp.war/
warUrl=.../deploy/management/console-mgr.sar/web-console.war/
22:30:07,906 INFO
22:30:07,921 INFO
22:30:08,031 INFO
[SimpleThreadPool] Job execution threads will use class loader of thread: main
22:30:08,078 INFO
22:30:08,078 INFO
22:30:08,218 INFO
22:30:08,218 INFO
22:30:08,875 INFO
[STDOUT] [Server@1c0cb76]:
22:30:08,875 INFO
[STDOUT] [Server@1c0cb76]:
22:30:08,875 INFO
22:30:08,875 INFO
22:30:08,890 INFO
22:30:09,218 INFO
[ConnectionFactoryBindingService] Bound
[C:\Archivos de programa\netbeans-5.5beta2\server.properties]
ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS'
to JNDI name 'java:DefaultDS'
22:30:09,250 INFO
22:30:10,218 INFO
22:30:10,218 INFO
22:30:10,218 INFO
22:30:10,218 INFO
22:30:10,218 INFO
22:30:11,421 INFO
22:30:11,421 INFO
22:30:11,421 INFO
22:30:11,421 INFO
22:30:11,437 INFO
22:30:11,453 INFO
22:30:11,468 INFO
22:30:11,468 INFO
22:30:11,468 INFO
22:30:11,781 INFO
22:30:11,859 INFO
22:30:12,078 INFO
22:30:12,812 INFO
22:30:12,828 INFO
[JmxKernelAbstraction]
22:30:12,953 INFO
jboss.jca:name=DefaultDS,service=ManagedConnectionFactory
22:30:13,015 INFO
22:30:13,031 INFO
22:30:13,031 INFO
22:30:13,234 INFO
22:30:13,250 INFO
22:30:13,515 WARN
[Ejb3Configuration] Persistence provider caller does not implements the EJB3 spec
22:30:13,656 INFO
22:30:13,812 INFO
22:30:13,890 INFO
22:30:13,984 INFO
22:30:13,984 INFO
22:30:13,984 INFO
22:30:13,984 INFO
22:30:14,234 INFO
22:30:14,234 INFO
22:30:14,234 INFO
22:30:14,234 INFO
22:30:14,250 INFO
22:30:14,250 INFO
22:30:15,546 INFO
22:30:15,562 INFO
22:30:15,562 INFO
22:30:15,562 INFO
22:30:15,625 INFO
22:30:15,640 INFO
22:30:16,062 INFO
org.hibernate.ejb.transaction.JoinableCMTTransactionFactory
org.hibernate.transaction.JBossTransactionManagerLookup
22:30:16,062 INFO
22:30:16,062 INFO
22:30:16,062 INFO
22:30:16,062 INFO
22:30:16,062 INFO
22:30:16,546 INFO
22:30:16,546 INFO
22:30:16,546 INFO
22:30:16,546 INFO
22:30:16,546 INFO
22:30:16,546 INFO
22:30:16,546 INFO
22:30:17,078 INFO
22:30:17,078 INFO
22:30:17,078 INFO
22:30:17,078 INFO
22:30:17,078 INFO
22:30:17,078 INFO
22:30:17,078 INFO
22:30:17,546 INFO
22:30:17,546 INFO
22:30:17,546 INFO
22:30:17,656 INFO
22:30:18,140 INFO
22:30:18,140 INFO
22:30:18,234 INFO
22:30:18,562 INFO
22:30:18,687 INFO
22:30:18,687 INFO
[JmxKernelAbstraction]
persistence.units:jar=CarritoApp-
ejb.jar,unitName=CarritoApp-ejbPU
22:30:18,750 INFO
22:30:18,781 INFO
22:30:18,781 INFO
[JmxKernelAbstraction]
22:30:19,078 INFO
22:30:19,156 INFO
22:30:19,156 INFO
[JmxKernelAbstraction]
22:30:19,171 INFO
22:30:19,187 INFO
22:30:19,562 INFO
[JmxKernelAbstraction]
22:30:19,578 INFO
22:30:19,609 INFO
[EJB3Deployer] Deployed:
ejb.jar,unitName=CarritoApp-ejbPU
ejb.jar,unitName=CarritoApp-ejbPU
ejb.jar,unitName=CarritoApp-ejbPU
file:/C:/jboss-4.0.4.GA/server/default/deploy/CarritoApp-ejb.jar
22:30:19,875 INFO
22:30:20,484 INFO
22:30:20,765 INFO
22:30:21,187 INFO
22:30:21,203 INFO
warUrl=.../tmp/deploy/tmp36853CarritoApp-war-exp.war/
file:/C:/jboss-4.0.4.GA/server/default/deploy/CarritoApp.ear
ear=CarritoApp.ear,
jar=CarritoApp-ejb.jar,
unitName=CarritoApp-ejbPU with dependencies:
22:30:21,203 INFO
[JmxKernelAbstraction]
jboss.jca:name=DefaultDS,service=ManagedConnectionFactory
22:30:21,218 WARN
22:30:21,218 INFO
22:30:21,578 INFO
22:30:21,578 INFO
22:30:21,578 INFO
22:30:21,578 INFO
22:30:21,578 INFO
22:30:21,578 INFO
22:30:22,062 INFO
22:30:22,062 INFO
22:30:22,062 INFO
22:30:22,062 INFO
22:30:22,062 INFO
22:30:22,078 INFO
22:30:22,578 INFO
22:30:22,609 INFO
22:30:22,609 INFO
22:30:22,609 INFO
22:30:22,609 INFO
22:30:22,609 INFO
22:30:23,078 INFO
22:30:23,078 INFO
22:30:23,078 INFO
22:30:23,078 INFO
22:30:23,078 INFO
22:30:23,562 INFO
22:30:23,562 INFO
22:30:23,562 INFO
22:30:23,562 INFO
22:30:23,562 INFO
22:30:23,562 INFO
22:30:23,562 INFO
22:30:23,562 INFO
22:30:23,562 INFO
22:30:23,562 INFO
org.hibernate.ejb.transaction.JoinableCMTTransactionFactory
org.hibernate.transaction.JBossTransactionManagerLookup
22:30:23,562 INFO
22:30:23,562 INFO
22:30:23,562 INFO
22:30:23,562 INFO
22:30:23,562 INFO
22:30:23,562 INFO
22:30:23,562 INFO
22:30:23,562 INFO
22:30:23,562 INFO
22:30:23,562 INFO
22:30:23,625 INFO
22:30:23,625 INFO
properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory,
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
22:30:23,640 INFO
22:30:23,734 INFO
22:30:23,765 INFO
22:30:23,765 INFO
[JmxKernelAbstraction]
persistence.units: ear=CarritoApp.ear,
jar=CarritoApp-ejb.jar,
unitName=CarritoApp-ejbPU
22:30:23,796 INFO
22:30:23,796 INFO
22:30:24,265 INFO
[JmxKernelAbstraction]
persistence.units:
ear=CarritoApp.ear,
jar=CarritoApp-ejb.jar,
unitName=CarritoApp-ejbPU
22:30:24,281 INFO
22:30:24,296 INFO
22:30:24,296 INFO
[JmxKernelAbstraction]
persistence.units:
ear=CarritoApp.ear,
jar=CarritoApp-ejb.jar,
unitName=CarritoApp-ejbPU
22:30:24,765 INFO
22:30:24,781 INFO
ejbName: CartFacturaFacade
jar=CarritoApp-ejb.jar,
name=CartProductoFacade,
service=EJB3 with dependencies:
22:30:24,781 INFO
[JmxKernelAbstraction]
persistence.units:
ear=CarritoApp.ear,
jar=CarritoApp-ejb.jar,
unitName=CarritoApp-ejbPU
22:30:24,796 INFO
22:30:24,796 INFO
[EJB3Deployer] Deployed:
file:/C:/jboss-4.0.4.GA/server/default/tmp/deploy/tmp36854CarritoApp.ear-contents/CarritoApp-ejb.jar
22:30:25,250 INFO
[TomcatDeployer] deploy,
ctxPath=/CarritoApp-war,
warUrl=.../tmp/deploy/tmp36854CarritoApp.ear-contents/CarritoApp-war-exp.war/
22:30:25,531 INFO
22:30:25,578 INFO
22:30:25,812 INFO
22:30:25,828 INFO
22:30:25,859 INFO
config=null