´«ÖDz¥¿Íjavaѧϰ EJB3½ø½×
ÎÒ½ñÌìѧϰÁËÐìÀÏʦ½²µÄEJB3µÄ֪ʶ£¬ÎÒ×öÁ˼òµ¥µÄ±Ê¼Ç£º
SLSBÎÞ״̬»á»°BeanµÄ±à³Ì¹æÔò;
EJBÀà
±à³Ì¹æÔò
ÖÁÉÙÓÐÒ»¸öÒµÎñ½Ó¿Ú
±ØÐëÊǾßÌåÀà.²»ÄÜÊÇfinal»ò³éÏóµÄ.
±ØÐëÓпչ¹Ôì
¿ÉÒÔÊÇÆäËüsessionbean»òpojoµÄ×ÓÀà
@Stateless
public CustomerManagerBean extends BaseManagerBean
implements CustomerManager {
...
}
ÉúÃüÖÜÆڻص÷·½·¨¿ÉÒÔ¶¨ÒåÔÚbeanÀàÖлò³¬ÀàÖÐ.
×¢½â¼Ì³ÐÐèÒªÊܵ½ÏÞÖÆ,³¬ÀàÖÐ@Stateless or @Stateful×¢½âÔÚ²¿Êðʱ½«
Òª±»ºöÂÔ.µ«¶¨ÒåµÄÈκλص÷·½·¨ºÍ×ÊÔ´×¢È붼Ҫ±»¼Ì³Ð.
ÒµÎñ·½·¨Ãû²»ÄÜÒÔejb¿ªÍ·,¿ÉÄÜ»á¸ÉÈÅejbµ×²ã´¦Àí.±ØÐ붨ÒåËùÓеķ½·¨Îª
publicµÄ,µ«²»ÄÜÊÇfinal»òstaticµÄ.ÔÚÔ¶³ÌÒµÎñ½Ó¿ÚÖеĶ¨ÒåµÄ²ÎÊýºÍ·µ»Ø
ÖµÀàÐͱØÐëʵÏÖjava´®Ðл¯½Ó¿Ú.
»á»°×´Ì¬ºÍSession beanÀàÐÍ
Èç¹ûbeanҪά»¤»á»°×´Ì¬,¼ÇסÉϴν»Á÷µÄ½á¹û,ÕâÊÇÓÐ״̬µÄ»á»°bean.ÕâÒâζ
×Åbean»á´Ó·½·¨µ÷ÓÃÖд洢Êý¾Ýµ½ÊµÀý±äÁ¿,²¢Ê¹Óûº´æµÄÊý¾ÝÀ´´¦ÀíÏÂÒ»´Î·½
·¨µ÷ÓÃ.
SLSB²»Î¬»¤ÈκÎ״̬,SFSBÇ÷ÏòÓÚ¶Ô¶à¸ö²½ÖèµÄ¹¤×÷Á÷½øÐн¨Ä£,SLSBÔòÇ÷ÏòÓë
¶Ô³£¹æÄ¿µÄ½øÐн¨Ä£. SFSBµäÐÍ°¸Àý¾ÍÊǹºÎï³µ.
SLSB-ÉúÃüÖÜÆڻص÷
BeanµÄÉúÃüÖÜÆڻص÷
session beanÓÐÉúÃüÖÜÆÚ,Òâζ×Å»áÓÐһϵÁÐ״̬µÄת±ä.¿Í»§¶ËºÍbean¶¼²»
¸ºÔðbeanʵÀýºÎʱ´´½¨,ºÎʱÏú»Ù,ºÎʱ½øÐÐÓÅ»¯.ÕâЩÐÐΪ¶¼ÓÉÈÝÆ÷½øÐйÜÀí.
ÉúÃüÖÜÆÚʼþ:
¿ÉÒÔ¹é½áΪ¼¸¸ö½×¶Î»òʼþ.×îÃ÷ÏÔµÄÊÇ´´½¨ºÍÏú»Ù,ËùÓеÄbean¶¼ÐèÒªÕâÁ½¸öÊÂ
¼þ.SFSB»¹»áÓÐpassivation(¶Û»¯)/activation(¼¤»î).
bean³õʼ»¯Ê±,»á·¢ÉúÈçϹý³Ì:
1.ÈÝÆ÷µ÷ÓÃnewInstance·½·¨.
2.Èç¹ûbeanʹÓÃDI,ËùÓÐÒÀÀµµÄ×ÊÔ´¡¢beanºÍ»·¾³×é¼þ¶¼Òª×¢Èë½øÀ´.
»Øµ÷·½·¨ÊDZ»×¢½â±ê×¢µÄ·½·¨.±ÈÈç@PostContructºÍ@PreDestroy.·½·¨¿ÉÒÔÊÇ
¹«ÓС¢Ë½ÓС¢Êܱ£»¤ºÍ°ü±£»¤µÄ.
PostConstruct:ʵÀý´´½¨²¢DIÖ®ºóµ÷ÓÃ.
PreDestr
Ïà¹ØÎĵµ£º
ÒòΪ¼´½«ÒªÑ§Ï°lucene£¬ËùÒÔÎÒÌáǰԤϰÁËluceneµÄÏà¹Ø֪ʶ£¬
1£¬luceneÊÇÖÚ¶àËÑË÷ÒýÇæÖеÄÒ»¸ö£¬¾ÍÏñ³Ö¾Ã²ã³ýÁËHibernateÍâÒ²ÓкܶàÆäËü¿ò¼Ü
Ò»Ñù¡£LuceneÊÇÒ»¸ö¿ª·¢¹¤¾ß°ü£¬ÎÒÃÇ¿ÉÒÔʹÓÃËûΪӦÓóÌÐòÌí¼ÓÈ«ÎļìË÷µÄ¹¦ÄÜ¡£
2£¬Ä¿Ç°ÒѾÓкܶàÓ¦ÓóÌÐòµÄËÑË÷¹¦ÄÜÊÇ»ùÓÚ Lucene µÄ£¬±ÈÈç Eclipse µÄ°ïÖúϵ
ͳµÄËÑË÷¹¦ÄÜ¡£ ......
ÎÒ½ñÌìԤϰÁ˹¤×÷Á÷µÄ֪ʶ£¬ÎÒ×öÁ˼òµ¥µÄ±Ê¼Ç£º
¹¤×÷Á÷£¨Workflow£©
¹¤×÷Á÷¾ÍÊǹ¤×÷Á÷³ÌµÄ¼ÆËã»ú»¯£¬¼´½«¹¤×÷Á÷³ÌÖеŤ×÷ÈçºÎÇ°ºó×éÖ¯ÔÚÒ»ÆðµÄ
Âß¼ºÍ¹æÔòÔÚ¼ÆËã»úÖÐÒÔÇ¡µ±µÄÄ£ÐͽøÐбíʾ²¢¶ÔÆäʵʩ¼ÆËã¡£
¹¤×÷Á÷Òª½â¾öµÄÖ÷ÒªÎÊÌâÊÇ£ºÎªÊµÏÖij¸öÒµÎñÄ¿±ê£¬ÔÚ¶à¸ö²ÎÓëÕßÖ®¼ä£¬ÀûÓüÆ
Ëã»ú£¬°´Ä³ÖÖÔ¤¶¨¹æÔò×Ô¶¯´«µÝÎÄ ......
ÎÒ½ñÌìѧϰÁËjbpmµÄ֪ʶ£ºÎÒ×öÁ˼òµ¥µÄÕªÒª£º
Á÷³ÌͼÖеĸ÷ÖÖ½ÚµãµÄ×÷Óü°Ó÷¨£º
ÐèÒªÓв»Í¬ÀàÐÍ£¨×÷Ó㩵Ľڵ㣬²ÅÄÜÉè¼Æ³ö¸´ÔÓµÄÁ÷³Ìͼ¡£JbpmÓÐÒ»Ì×Ô¤Ïȶ¨ÒåºÃµÄ½ÚµãÀàÐÍ¡£Èç¹û²»¹»Óã¬Ò²¿ÉÒÔʹÓÃ×Ô¶¨Òå½Úµã½øÐÐÀ©Õ¹£¬ÒÔÍê³É²»Í¬µÄÁ÷³ÌµÄÐèÒª¡£²»Í¬µÄ½ÚµãÀàÐÍ´ú±í²»Í¬µÄÐÐΪ¡£
ÿ¸öÁ÷³Ì¶¼±ØÐëÒªÓп ......
½ñÌìÊÇѧϰOAϵͳµÄµÚÒ»Ì죬ÎÒ¶Ô½ñÌìµÄÉÏ¿ÎÄÚÈÝ×öÁ˼òµ¥µÄ×ܽ᣺
OA¼ò½é£º
OAÊÇOFFICE AUTOMATIONµÄËõд£¬±¾ÒâΪÀûÓü¼ÊõµÄÊÖ¶ÎÌá¸ß°ì¹«µÄЧÂÊ£¬½ø¶øʵÏְ칫µÄ×Ô¶¯»¯´¦Àí¡£²ÉÓÃInternet/Intranet¼¼Êõ£¬»ùÓÚ¹¤×÷Á÷µÄ¸ÅÄʹÆóÒµÄÚ²¿ÈËÔ±·½±ã¿ì½ÝµØ¹²ÏíÐÅÏ¢£¬¸ßЧµØÐͬ¹¤×÷£»¸Ä±ä¹ýÈ¥¸´ÔÓ¡¢µÍЧµÄÊÖ¹¤°ì¹«·½Ê½£¬ÊµÏÖѸËÙ ......